@syntest/logging
Advanced tools
Comparing version 0.1.0-beta.6 to 0.1.0-beta.7
@@ -23,3 +23,3 @@ "use strict"; | ||
const winston_1 = require("winston"); | ||
let singleTonLogger; | ||
let singletonLogger; | ||
function setupLogger(logDirectory, fileLogLevel, consoleLogLevel) { | ||
@@ -56,7 +56,7 @@ const fileTransportOptions = { | ||
} | ||
singleTonLogger = (0, winston_1.createLogger)(baseLoggerOptions); | ||
singletonLogger = (0, winston_1.createLogger)(baseLoggerOptions); | ||
} | ||
exports.setupLogger = setupLogger; | ||
function getLogger(context) { | ||
if (singleTonLogger === undefined) { | ||
if (singletonLogger === undefined) { | ||
throw new Error("Should call setupLogger function before using getLogger function!"); | ||
@@ -76,3 +76,3 @@ } | ||
error(message) { | ||
singleTonLogger.log({ | ||
singletonLogger.log({ | ||
level: "error", | ||
@@ -84,3 +84,3 @@ message: message, | ||
warn(message) { | ||
singleTonLogger.log({ | ||
singletonLogger.log({ | ||
level: "warn", | ||
@@ -92,3 +92,3 @@ message: message, | ||
info(message) { | ||
singleTonLogger.log({ | ||
singletonLogger.log({ | ||
level: "info", | ||
@@ -100,3 +100,3 @@ message: message, | ||
debug(message) { | ||
singleTonLogger.log({ | ||
singletonLogger.log({ | ||
level: "debug", | ||
@@ -108,3 +108,3 @@ message: message, | ||
silly(message) { | ||
singleTonLogger.log({ | ||
singletonLogger.log({ | ||
level: "silly", | ||
@@ -111,0 +111,0 @@ message: message, |
{ | ||
"name": "@syntest/logging", | ||
"version": "0.1.0-beta.6", | ||
"version": "0.1.0-beta.7", | ||
"description": "The log library of the SynTest Framework", | ||
@@ -58,3 +58,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "909f98a3d10c385bb833a094c65b3352ba6a7e3c" | ||
"gitHead": "b926916150bb83084b9803ca935b44326488ebab" | ||
} |
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