@orion-js/logger 3.1.0-alpha.11 → 3.1.0-alpha.12

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/lib/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import winston from 'winston';
2
2
  export * from './formats';
3
3
  export * from './logger';
4
+ export * from './types';
4
5
  export { winston };
package/lib/index.js CHANGED
@@ -18,3 +18,4 @@ const winston_1 = __importDefault(require("winston"));
18
18
  exports.winston = winston_1.default;
19
19
  __exportStar(require("./formats"), exports);
20
20
  __exportStar(require("./logger"), exports);
21
+ __exportStar(require("./types"), exports);
package/lib/logger.d.ts CHANGED
@@ -1,15 +1,8 @@
1
- /// <reference types="node" />
2
1
  import winston from 'winston';
2
+ import { OrionLogger } from './types';
3
3
  export declare const winstonLogger: winston.Logger;
4
4
  export declare const configureLogger: (options: winston.LoggerOptions) => void;
5
5
  export declare const setLogLevel: (level: string) => string;
6
6
  export declare const addTransport: (transport: winston.transport) => winston.Logger;
7
7
  export declare const getLogger: (context: string) => winston.Logger;
8
- export declare const logger: {
9
- debug: (message: string, metadata?: any) => winston.Logger;
10
- info: (message: string, metadata?: any) => winston.Logger;
11
- warn: (message: string, metadata?: any) => winston.Logger;
12
- error: (message: string, metadata?: any) => winston.Logger;
13
- addContext: (module: NodeJS.Module) => any;
14
- addMetadata: (metadata: any) => any;
15
- };
8
+ export declare const logger: OrionLogger;
@@ -0,0 +1,10 @@
1
+ /// <reference types="node" />
2
+ export declare type LogFunction = (message: string, metadata?: any) => void;
3
+ export interface OrionLogger {
4
+ debug: LogFunction;
5
+ info: LogFunction;
6
+ warn: LogFunction;
7
+ error: LogFunction;
8
+ addContext: (module: NodeJS.Module) => OrionLogger;
9
+ addMetadata: (metadata: any) => OrionLogger;
10
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orion-js/logger",
3
- "version": "3.1.0-alpha.11",
3
+ "version": "3.1.0-alpha.12",
4
4
  "main": "lib/index.js",
5
5
  "author": "nicolaslopezj",
6
6
  "license": "MIT",
@@ -25,5 +25,5 @@
25
25
  "publishConfig": {
26
26
  "access": "public"
27
27
  },
28
- "gitHead": "b0230af46353d1925e366dc21878743fd5cd9ec0"
28
+ "gitHead": "bddf1b3a64bf128c44085c9d5d25562ba78c186f"
29
29
  }