@marinade.finance/ts-common
Advanced tools
Comparing version 2.0.16 to 2.0.17
{ | ||
"name": "@marinade.finance/ts-common", | ||
"version": "2.0.16", | ||
"version": "2.0.17", | ||
"description": "TS common utilities", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -14,6 +14,6 @@ export type LoggerPlaceholder = LoggerDebugAble & LoggerInfoAble & LoggerWarnAble & LoggerErrorAble; | ||
}; | ||
export declare function logDebug(logger: object | undefined, ...data: any): void; | ||
export declare function logInfo(logger: object | undefined, data: any): void; | ||
export declare function logWarn(logger: object | undefined, data: any): void; | ||
export declare function logError(logger: object | undefined, data: any): void; | ||
export declare function logDebug(logger: object | undefined | boolean, ...data: any): void; | ||
export declare function logInfo(logger: object | undefined, ...data: any): void; | ||
export declare function logWarn(logger: object | undefined, ...data: any): void; | ||
export declare function logError(logger: object | undefined, ...data: any): void; | ||
export declare function isLevelEnabled(logger: any | undefined, level: string): boolean | undefined; |
@@ -9,3 +9,4 @@ "use strict"; | ||
} | ||
else { | ||
else if (logger) { | ||
// logger level is switched off by default | ||
console.debug(data); | ||
@@ -15,3 +16,3 @@ } | ||
exports.logDebug = logDebug; | ||
function logInfo(logger, data) { | ||
function logInfo(logger, ...data) { | ||
if (checkIfFunction(logger, 'info')) { | ||
@@ -25,3 +26,3 @@ logger.info(data); | ||
exports.logInfo = logInfo; | ||
function logWarn(logger, data) { | ||
function logWarn(logger, ...data) { | ||
if (checkIfFunction(logger, 'warn')) { | ||
@@ -35,3 +36,3 @@ logger.warn(data); | ||
exports.logWarn = logWarn; | ||
function logError(logger, data) { | ||
function logError(logger, ...data) { | ||
if (checkIfFunction(logger, 'error')) { | ||
@@ -38,0 +39,0 @@ logger.error(data); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12003
170