@cumulus/logger
Advanced tools
Comparing version 1.22.1 to 1.23.0
@@ -24,8 +24,32 @@ /// <reference types="node" /> | ||
constructor(options?: LoggerConstructorOptions); | ||
/** | ||
* Log a debug message | ||
*/ | ||
debug(...messageArgs: any[]): void; | ||
/** | ||
* Log an error message | ||
*/ | ||
error(...messageArgs: any[]): void; | ||
/** | ||
* Log a fatal message | ||
*/ | ||
fatal(...messageArgs: any[]): void; | ||
/** | ||
* Log an info message | ||
*/ | ||
info(...messageArgs: any[]): void; | ||
/** | ||
* Log an event with additional properties | ||
* | ||
* @param additionalKeys - | ||
* @param messageArgs - the message to log | ||
*/ | ||
infoWithAdditionalKeys(additionalKeys: object, ...messageArgs: any[]): void; | ||
/** | ||
* Log a trace message | ||
*/ | ||
trace(...messageArgs: any[]): void; | ||
/** | ||
* Log a warning message | ||
*/ | ||
warn(...messageArgs: any[]): void; | ||
@@ -32,0 +56,0 @@ private writeLogEvent; |
@@ -16,5 +16,11 @@ "use strict"; | ||
} | ||
/** | ||
* Log a debug message | ||
*/ | ||
debug(...messageArgs) { | ||
this.writeLogEvent('debug', messageArgs); | ||
} | ||
/** | ||
* Log an error message | ||
*/ | ||
error(...messageArgs) { | ||
@@ -41,14 +47,32 @@ const lastMessageArg = messageArgs[messageArgs.length - 1]; | ||
} | ||
/** | ||
* Log a fatal message | ||
*/ | ||
fatal(...messageArgs) { | ||
this.writeLogEvent('fatal', messageArgs); | ||
} | ||
/** | ||
* Log an info message | ||
*/ | ||
info(...messageArgs) { | ||
this.writeLogEvent('info', messageArgs); | ||
} | ||
/** | ||
* Log an event with additional properties | ||
* | ||
* @param additionalKeys - | ||
* @param messageArgs - the message to log | ||
*/ | ||
infoWithAdditionalKeys(additionalKeys, ...messageArgs) { | ||
this.writeLogEvent('info', messageArgs, additionalKeys); | ||
} | ||
/** | ||
* Log a trace message | ||
*/ | ||
trace(...messageArgs) { | ||
this.writeLogEvent('trace', messageArgs); | ||
} | ||
/** | ||
* Log a warning message | ||
*/ | ||
warn(...messageArgs) { | ||
@@ -55,0 +79,0 @@ this.writeLogEvent('warn', messageArgs); |
{ | ||
"name": "@cumulus/logger", | ||
"version": "1.22.1", | ||
"version": "1.23.0", | ||
"description": "A log library for use on Cumulus", | ||
@@ -28,6 +28,9 @@ "keywords": [ | ||
"scripts": { | ||
"tsc": "tsc", | ||
"prepare": "npm run tsc", | ||
"test": "ava" | ||
"test": "../../node_modules/.bin/ava", | ||
"tsc": "../../node_modules/.bin/tsc" | ||
}, | ||
"ava": { | ||
"timeout": "15m" | ||
}, | ||
"nyc": { | ||
@@ -43,9 +46,3 @@ "exclude": [ | ||
}, | ||
"devDependencies": { | ||
"@types/lodash.iserror": "^3.1.6", | ||
"ava": "^2.1.0", | ||
"moment": "2.24.0", | ||
"typescript": "^3.8.3" | ||
}, | ||
"gitHead": "3afec6cb6b37c3695fe9c78b4c3136f02337563f" | ||
"gitHead": "68df6858844a6cd826d62801c34ae549871ce774" | ||
} |
19951
0
169