onecore 0.6.8 → 0.6.9

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.
Files changed (3) hide show
  1. package/README.md +9 -43
  2. package/package.json +1 -1
  3. package/src/logger.ts +10 -10
package/README.md CHANGED
@@ -1973,49 +1973,15 @@ interface Logger {
1973
1973
  name: Name;
1974
1974
  level: number;
1975
1975
  map: LogMap;
1976
- constants?: SimpleMap;
1977
-
1978
- trace(
1979
- msg: string,
1980
- m?: SimpleMap,
1981
- ctx?: any
1982
- ): void;
1983
-
1984
- debug(
1985
- msg: string,
1986
- m?: SimpleMap,
1987
- ctx?: any
1988
- ): void;
1989
-
1990
- info(
1991
- msg: string,
1992
- m?: SimpleMap,
1993
- ctx?: any
1994
- ): void;
1995
-
1996
- warn(
1997
- msg: string,
1998
- m?: SimpleMap,
1999
- ctx?: any
2000
- ): void;
2001
-
2002
- error(
2003
- msg: string,
2004
- m?: SimpleMap,
2005
- ctx?: any
2006
- ): void;
2007
-
2008
- panic(
2009
- msg: string,
2010
- m?: SimpleMap,
2011
- ctx?: any
2012
- ): void;
2013
-
2014
- fatal(
2015
- msg: string,
2016
- m?: SimpleMap,
2017
- ctx?: any
2018
- ): void;
1976
+ constants?: Context;
1977
+
1978
+ trace(msg: string, context?: Context, ctx?: any): void;
1979
+ debug(msg: string, context?: Context, ctx?: any): void;
1980
+ info(msg: string, context?: Context, ctx?: any): void;
1981
+ warn(msg: string, context?: Context, ctx?: any): void;
1982
+ error(msg: string, context?: Context, ctx?: any): void;
1983
+ panic(msg: string, context?: Context, ctx?: any): void;
1984
+ fatal(msg: string, context?: Context, ctx?: any): void;
2019
1985
 
2020
1986
  isLevelEnabled(level: number): boolean;
2021
1987
  isTraceEnabled(): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "onecore",
3
- "version": "0.6.8",
3
+ "version": "0.6.9",
4
4
  "description": "onecore",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./src/index.ts",
package/src/logger.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  export interface NumberMap {
2
2
  [key: string]: number;
3
3
  }
4
- export interface SimpleMap {
4
+ export interface Context {
5
5
  [key: string]: string | number | boolean | Date;
6
6
  }
7
7
  export interface LogMap {
@@ -17,7 +17,7 @@ export interface LogMapConfig {
17
17
  export interface Config {
18
18
  level?: string;
19
19
  map?: LogMapConfig;
20
- constants?: SimpleMap;
20
+ constants?: Context;
21
21
  name?: Name;
22
22
  }
23
23
  export type LogConf = Config;
@@ -37,14 +37,14 @@ export interface Logger {
37
37
  name: Name;
38
38
  level: number;
39
39
  map: LogMap;
40
- constants?: SimpleMap;
41
- trace(msg: string, m?: SimpleMap, ctx?: any): void;
42
- debug(msg: string, m?: SimpleMap, ctx?: any): void;
43
- info(msg: string, m?: SimpleMap, ctx?: any): void;
44
- warn(msg: string, m?: SimpleMap, ctx?: any): void;
45
- error(msg: string, m?: SimpleMap, ctx?: any): void;
46
- panic(msg: string, m?: SimpleMap, ctx?: any): void;
47
- fatal(msg: string, m?: SimpleMap, ctx?: any): void;
40
+ constants?: Context;
41
+ trace(msg: string, context?: Context, ctx?: any): void;
42
+ debug(msg: string, context?: Context, ctx?: any): void;
43
+ info(msg: string, context?: Context, ctx?: any): void;
44
+ warn(msg: string, context?: Context, ctx?: any): void;
45
+ error(msg: string, context?: Context, ctx?: any): void;
46
+ panic(msg: string, context?: Context, ctx?: any): void;
47
+ fatal(msg: string, context?: Context, ctx?: any): void;
48
48
  isLevelEnabled(level: number): boolean;
49
49
  isTraceEnabled(): boolean;
50
50
  isDebugEnabled(): boolean;