http-system-logger 1.0.7 → 1.0.8

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/dist/index.d.ts CHANGED
@@ -1,7 +1,8 @@
1
1
  export declare class Logger {
2
- private readonly context;
2
+ private context;
3
3
  private readonly logger;
4
4
  constructor(context: string);
5
+ setContext(context: string): void;
5
6
  info(message: string, context?: string): void;
6
7
  error(message: string, trace?: string, context?: string): void;
7
8
  warn(message: string, context?: string): void;
package/dist/index.js CHANGED
@@ -10,6 +10,9 @@ class Logger {
10
10
  this.context = context;
11
11
  this.logger = (0, winston_config_1.getLogger)();
12
12
  }
13
+ setContext(context) {
14
+ this.context = context;
15
+ }
13
16
  info(message, context) {
14
17
  this.logger.info(message, { context: context || this.context });
15
18
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "http-system-logger",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "A lightweight and configurable logging library for Node.js applications, built with winston and morgan.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",