@travetto/log 6.0.0-rc.2 → 6.0.1

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": "@travetto/log",
3
- "version": "6.0.0-rc.2",
3
+ "version": "6.0.1",
4
4
  "description": "Logging framework that integrates at the console.log level.",
5
5
  "keywords": [
6
6
  "typescript",
@@ -23,9 +23,9 @@
23
23
  "directory": "module/log"
24
24
  },
25
25
  "dependencies": {
26
- "@travetto/config": "^6.0.0-rc.2",
27
- "@travetto/di": "^6.0.0-rc.2",
28
- "@travetto/terminal": "^6.0.0-rc.2"
26
+ "@travetto/config": "^6.0.1",
27
+ "@travetto/di": "^6.0.1",
28
+ "@travetto/terminal": "^6.0.1"
29
29
  },
30
30
  "travetto": {
31
31
  "displayName": "Logging"
@@ -2,9 +2,9 @@ import { inspect, type InspectOptions } from 'node:util';
2
2
  import { DataUtil } from '@travetto/schema';
3
3
  import { LogEvent } from '../types.ts';
4
4
 
5
- export class LogFormatUtil {
6
- static #inspectOptions = { colors: false, showHidden: false, depth: 5, breakLength: 200 };
5
+ const INSPECT_OPTIONS = { colors: false, showHidden: false, depth: 5, breakLength: 200 };
7
6
 
7
+ export class LogFormatUtil {
8
8
  /** Generate log context */
9
9
  static getContext(ev: LogEvent): Record<string, unknown> | undefined {
10
10
  const out: Record<string, unknown> = {};
@@ -17,7 +17,7 @@ export class LogFormatUtil {
17
17
  }
18
18
 
19
19
  /** Get log message */
20
- static getLogMessage(ev: LogEvent, options: InspectOptions = this.#inspectOptions): string {
20
+ static getLogMessage(ev: LogEvent, options: InspectOptions = INSPECT_OPTIONS): string {
21
21
  const formatted = ev.args?.map(x => typeof x === 'string' ? x : inspect(x, options)) ?? [];
22
22
  return (ev.message ? [ev.message, ...formatted] : formatted).join(' ');
23
23
  }