@athenna/logger 1.0.3 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@athenna/logger",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "author": "João Lenon <lenon@athenna.io>",
@@ -27,7 +27,7 @@ class ConsoleDriver {
27
27
  streamType: this._streamType,
28
28
  }, options);
29
29
  message = FormatterFactory_1.FormatterFactory.fabricate(options.formatter).format(message, options);
30
- process[this._streamType].write(`${message}\n`);
30
+ process[options.streamType].write(`${message}\n`);
31
31
  }
32
32
  }
33
33
  exports.ConsoleDriver = ConsoleDriver;
@@ -14,7 +14,7 @@ const getTimestamp_1 = require("../Utils/getTimestamp");
14
14
  class ContextFormatter {
15
15
  format(message, options) {
16
16
  options = Object.assign({}, { color: Color_1.Color.green, context: 'Logger' }, options);
17
- const pid = Color_1.Color.darkPurple(`[Athenna] - PID: ${process.pid}`);
17
+ const pid = Color_1.Color.yellow(`[Athenna] - PID: ${process.pid}`);
18
18
  const timestamp = getTimestamp_1.getTimestamp();
19
19
  const messageCtx = Color_1.Color.yellow(`[${options.context}] `);
20
20
  const timestampDiff = ContextFormatter.getTimestampDiff();
@@ -14,7 +14,7 @@ const getTimestamp_1 = require("../Utils/getTimestamp");
14
14
  class DebugFormatter {
15
15
  format(message, options) {
16
16
  options = Object.assign({}, { color: Color_1.Color.green, context: 'Debugger', namespace: 'api:main' }, options);
17
- const pid = Color_1.Color.purple(`[Athenna Debugger] - PID: ${process.pid}`);
17
+ const pid = Color_1.Color.yellow(`[Athenna Debugger] - PID: ${process.pid}`);
18
18
  const timestamp = Color_1.Color.white(getTimestamp_1.getTimestamp());
19
19
  const messageCtx = Color_1.Color.yellow(`[${options.context}] `);
20
20
  const timestampDiff = DebugFormatter.getTimestampDiff();
@@ -14,7 +14,7 @@ class JsonFormatter {
14
14
  format(message, options) {
15
15
  options = Object.assign({}, { color: Color_1.Color.green }, options);
16
16
  const pid = Color_1.Color.yellow(`[Athenna] - PID: ${process.pid}`);
17
- return `${pid} - ${Color_1.Color.bold('JSON:')} ${options.color(JSON.stringify(message))}`;
17
+ return `${pid} - ${Color_1.Color.bold('JSON:')} ${options.color(JSON.stringify(message, null, 2))}`;
18
18
  }
19
19
  }
20
20
  exports.JsonFormatter = JsonFormatter;