File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed
Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -14,20 +14,20 @@ There are two actual ways of using async logger.
1414
15151 . Rely on singleton instance produced by this library, which is configured by
1616 environment variables (see Configuration section below)
17-
17+
1818 In this case as simple as
1919 ~~~ typescript
20- import logger from ' @imqueue/async-async- logger' ;
21-
20+ import logger from ' @imqueue/async-logger' ;
21+
2222 serviceOptions .logger = logger ;
2323 ~~~
2424
25252 . Instantiate and configure async logger programmatically:
2626 ~~~ typescript
27- import { Logger } from ' @imqueue/async-async- logger' ;
28-
27+ import { Logger } from ' @imqueue/async-logger' ;
28+
2929 const { name, version } = require (' ./package.json' );
30-
30+
3131 const logger = new Logger ({
3232 transports: [{
3333 type: ' http' ,
@@ -48,7 +48,7 @@ There are two actual ways of using async logger.
4848 hostname: ' localhost'
4949 },
5050 });
51-
51+
5252 serviceOptions .logger = logger ;
5353 ~~~
5454
Original file line number Diff line number Diff line change @@ -51,9 +51,9 @@ export class Logger implements ILogger {
5151 */
5252 private static readonly console : ILogger = {
5353 log : ( ...args : any [ ] ) => setTimeout ( ( ) => console . log ( ...args ) ) ,
54- info : ( ...args : any [ ] ) => setTimeout ( ( ) => console . log ( ...args ) ) ,
55- warn : ( ...args : any [ ] ) => setTimeout ( ( ) => console . log ( ...args ) ) ,
56- error : ( ...args : any [ ] ) => setTimeout ( ( ) => console . log ( ...args ) ) ,
54+ info : ( ...args : any [ ] ) => setTimeout ( ( ) => console . info ( ...args ) ) ,
55+ warn : ( ...args : any [ ] ) => setTimeout ( ( ) => console . warn ( ...args ) ) ,
56+ error : ( ...args : any [ ] ) => setTimeout ( ( ) => console . error ( ...args ) ) ,
5757 } ;
5858
5959 /**
You can’t perform that action at this time.
0 commit comments