diff --git a/libraries/js/examples/configs/jsonConfig.json b/libraries/js/examples/configs/jsonConfig.json index 66738a1..77818c9 100644 --- a/libraries/js/examples/configs/jsonConfig.json +++ b/libraries/js/examples/configs/jsonConfig.json @@ -2,6 +2,6 @@ "env": "test", "logfile": null, "consoleOnly": false, - "logStatementPattern": "{timestamp} | {name}", + "logStatementPattern": "[ {component} ~ {status} ] : {message}", "logFormat" : "statement" } \ No newline at end of file diff --git a/libraries/js/examples/index.js b/libraries/js/examples/index.js index 5da87ec..23f9f0b 100644 --- a/libraries/js/examples/index.js +++ b/libraries/js/examples/index.js @@ -2,18 +2,25 @@ import Logsmith from "../logsmith/logsmith.js"; const logg = new Logsmith({}) +const SampleLog = { + status: "running", + component : "logger", + message: "The Test is Fine" +} -logg.WARN({ name: "tanmoy" }) +logg.WARN(SampleLog) +logg.INFO(SampleLog) +logg.SUCCESS(SampleLog) +logg.FAILURE(SampleLog) +logg.CRITICAL(SampleLog) +logg.LOG("TRAILING", SampleLog) -// logg.INFO({ name: "tanmoy" }) - -// logg.SUCCESS({ name: "tanmoy" }) +console.log() logg.fetchConfigFromFile("./libraries/js/examples/configs/jsonConfig.json") -logg.INFO({ name: "tanmoy" }) - -// logg.FAILURE({ name: "tanmoy" }) - -// logg.CRITICAL({ name: "tanmoy" }) - -// logg.LOG("TRAILING", { name: "Tanmoy" }) \ No newline at end of file +logg.WARN(SampleLog) +logg.INFO(SampleLog) +logg.SUCCESS(SampleLog) +logg.FAILURE(SampleLog) +logg.CRITICAL(SampleLog) +logg.LOG("TRAILING", SampleLog) \ No newline at end of file