Skip to content

Commit b9dadb7

Browse files
committed
Fix stale references and typos in readme
- jest -> vitest - logObject -> logObj typo in rotating file stream example - runtime: 'server' -> 'node' (changed in v4.10.0) - fix syntax error in transportFormatted example
1 parent f98c1ea commit b9dadb7

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ like sending messages to _Slack_ or _Telegram_ in case of an urgent error or for
582582

583583
##### Simple transport example
584584

585-
Here is a very simple implementation used in our _jest_ tests.
585+
Here is a very simple implementation used in our _vitest_ tests.
586586
This example will suppress logs from being sent to `console` (`type: "hidden"`) and will instead collect them in an `array`.
587587

588588
```typescript
@@ -639,7 +639,7 @@ const stream = createStream("tslog.log", {
639639

640640
const logger = new Logger();
641641
logger.attachTransport((logObj) => {
642-
stream.write(JSON.stringify(logObject) + "\n");
642+
stream.write(JSON.stringify(logObj) + "\n");
643643
});
644644

645645
logger.debug("I am a debug log.");
@@ -734,7 +734,7 @@ For `JSON` logs (no formatting happens here):
734734
default:
735735
console.log(logMetaMarkup, ...logArgs, ...logErrors);
736736
break;
737-
},
737+
}
738738
},
739739
});
740740
```
@@ -762,7 +762,7 @@ const logMsg = logger.info("Test");
762762
// '0': 'Test',
763763
// foo: 'bar',
764764
// _meta: {
765-
// runtime: 'server',
765+
// runtime: 'node',
766766
// hostname: 'Eugenes-MBP.local',
767767
// date: 2022-10-23T10:51:08.857Z,
768768
// logLevelId: 3,

docs/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ like sending messages to _Slack_ or _Telegram_ in case of an urgent error or for
582582

583583
##### Simple transport example
584584

585-
Here is a very simple implementation used in our _jest_ tests.
585+
Here is a very simple implementation used in our _vitest_ tests.
586586
This example will suppress logs from being sent to `console` (`type: "hidden"`) and will instead collect them in an `array`.
587587

588588
```typescript
@@ -639,7 +639,7 @@ const stream = createStream("tslog.log", {
639639

640640
const logger = new Logger();
641641
logger.attachTransport((logObj) => {
642-
stream.write(JSON.stringify(logObject) + "\n");
642+
stream.write(JSON.stringify(logObj) + "\n");
643643
});
644644

645645
logger.debug("I am a debug log.");
@@ -734,7 +734,7 @@ For `JSON` logs (no formatting happens here):
734734
default:
735735
console.log(logMetaMarkup, ...logArgs, ...logErrors);
736736
break;
737-
},
737+
}
738738
},
739739
});
740740
```
@@ -762,7 +762,7 @@ const logMsg = logger.info("Test");
762762
// '0': 'Test',
763763
// foo: 'bar',
764764
// _meta: {
765-
// runtime: 'server',
765+
// runtime: 'node',
766766
// hostname: 'Eugenes-MBP.local',
767767
// date: 2022-10-23T10:51:08.857Z,
768768
// logLevelId: 3,

0 commit comments

Comments
 (0)