@soos-io/api-client
Advanced tools
Comparing version 0.1.3-pre.5 to 0.1.3-pre.6
@@ -11,10 +11,14 @@ import { LogLevel } from "../enums"; | ||
setMinLogLevel(minLogLevel: LogLevel): void; | ||
debug(message?: any, ...optionalParams: any[]): void; | ||
info(message?: any, ...optionalParams: any[]): void; | ||
debug(message?: any, ...optionalParams: any[]): void; | ||
warn(message?: any, ...optionalParams: any[]): void; | ||
error(message?: any, ...optionalParams: any[]): void; | ||
group(...label: any[]): void; | ||
groupEnd(): void; | ||
verboseDebug(message?: any, ...optionalParams: any[]): void; | ||
verboseInfo(message?: any, ...optionalParams: any[]): void; | ||
verboseDebug(message?: any, ...optionalParams: any[]): void; | ||
verboseWarn(message?: any, ...optionalParams: any[]): void; | ||
verboseError(message?: any, ...optionalParams: any[]): void; | ||
verboseGroup(...label: any[]): void; | ||
verboseGroupEnd(): void; | ||
logLineSeparator(): void; | ||
@@ -21,0 +25,0 @@ } |
@@ -25,5 +25,5 @@ "use strict"; | ||
if (level >= this.minLogLevel) { | ||
const logLevelkey = enums_1.LogLevel[level]; | ||
const logLevelKey = enums_1.LogLevel[level]; | ||
const timestamp = this.getTimeStamp(); | ||
const logMessage = `${timestamp} UTC [${logLevelkey}] ${message}`; | ||
const logMessage = `${timestamp} UTC [${logLevelKey}] ${message}`; | ||
this.console.log(logMessage, ...optionalParams); | ||
@@ -38,8 +38,8 @@ } | ||
} | ||
debug(message, ...optionalParams) { | ||
this.logWithTimestamp(enums_1.LogLevel.DEBUG, message, ...optionalParams); | ||
} | ||
info(message, ...optionalParams) { | ||
this.logWithTimestamp(enums_1.LogLevel.INFO, message, ...optionalParams); | ||
} | ||
debug(message, ...optionalParams) { | ||
this.logWithTimestamp(enums_1.LogLevel.DEBUG, message, ...optionalParams); | ||
} | ||
warn(message, ...optionalParams) { | ||
@@ -51,7 +51,9 @@ this.logWithTimestamp(enums_1.LogLevel.WARN, message, ...optionalParams); | ||
} | ||
verboseInfo(message, ...optionalParams) { | ||
if (this.verbose) { | ||
this.info(message, ...optionalParams); | ||
} | ||
group(...label) { | ||
this.console.group(...label); | ||
} | ||
groupEnd() { | ||
this.console.groupEnd(); | ||
this.console.log("\n"); | ||
} | ||
verboseDebug(message, ...optionalParams) { | ||
@@ -62,2 +64,7 @@ if (this.verbose) { | ||
} | ||
verboseInfo(message, ...optionalParams) { | ||
if (this.verbose) { | ||
this.info(message, ...optionalParams); | ||
} | ||
} | ||
verboseWarn(message, ...optionalParams) { | ||
@@ -73,5 +80,15 @@ if (this.verbose) { | ||
} | ||
verboseGroup(...label) { | ||
if (this.verbose) { | ||
this.group(...label); | ||
} | ||
} | ||
verboseGroupEnd() { | ||
if (this.verbose) { | ||
this.groupEnd(); | ||
} | ||
} | ||
logLineSeparator() { | ||
const separator = "-".repeat(80); | ||
this.console.log(separator); | ||
this.console.log(`${separator}\n`); | ||
} | ||
@@ -78,0 +95,0 @@ } |
{ | ||
"name": "@soos-io/api-client", | ||
"version": "0.1.3-pre.5", | ||
"version": "0.1.3-pre.6", | ||
"description": "This is the SOOS API Client for registered clients leveraging the various integrations to the SOOS platform.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
28622
618