@contrail/app-framework
Advanced tools
Comparing version 1.3.0 to 1.3.1
@@ -10,3 +10,4 @@ export declare enum LogLevel { | ||
export interface LoggerConfig { | ||
logLevel: LogLevel; | ||
logLevel?: LogLevel; | ||
prependTimestamp?: boolean; | ||
} | ||
@@ -16,2 +17,3 @@ export declare class Logger { | ||
private static level; | ||
private static prependTimestamp; | ||
private static actionLogs; | ||
@@ -18,0 +20,0 @@ static consoleRef: any; |
@@ -16,2 +16,3 @@ "use strict"; | ||
static level = LogLevel.DEBUG; | ||
static prependTimestamp; | ||
static actionLogs = {}; | ||
@@ -22,2 +23,3 @@ static consoleRef; | ||
this.level = _config.logLevel ?? LogLevel.DEBUG; | ||
this.prependTimestamp = _config.prependTimestamp ?? true; | ||
} | ||
@@ -92,3 +94,4 @@ static isFatalOn() { | ||
} | ||
actionLogs[id].push(new Date().toISOString() + ': ' + args.join(' ')); | ||
const prefix = this.prependTimestamp ? new Date().toISOString() + ': ' : ''; | ||
actionLogs[id].push(prefix + args.join(' ')); | ||
} | ||
@@ -95,0 +98,0 @@ static getEntries(id) { |
{ | ||
"name": "@contrail/app-framework", | ||
"version": "1.3.0", | ||
"version": "1.3.1", | ||
"description": "The app framework for VibeIQ Apps.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
18516
484