Skip to content

Commit 8b12534

Browse files
committed
fix: correct console logging methods in Logger class and import paths in README
1 parent 13eb718 commit 8b12534

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,20 @@ There are two actual ways of using async logger.
1414

1515
1. 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

2525
2. 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

src/Logger.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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
/**

0 commit comments

Comments
 (0)