Another logger in JS. This one offers a console.log-like API and formatting, colored lines and timestamps (or not if desired), all that with 0 dependencies.

Commit 79fe28da

79fe28da2fb2Merged

Maxence Lecanu <[email protected]> · 4 years ago · 1 file · ~1 modified

Description

fix: fox docs

Details

Commit
79fe28da2fb2
Parent
ddc11e035e50

README.mdmodifiedView file

@@ -176,7 +176,9 @@
176176 Here the default implementation of the `log` method on the `BaseTransport class`. Let's break this down.
177177
178178 ```ts
179-export abstract class BaseTransport {
179+export abstract class BaseTransport<
180+ T extends PreparedMessage = PreparedMessage
181+> {
180182 //...
181183
182184 log(log: T) {
@@ -198,7 +200,7 @@
198200 > **This behaviour can be overriden when writing your own transport class.** For example, the `File` transport is implemented as follows:
199201
200202 ```ts
201-export class FileTransport {
203+export class FileTransport<T extends PreparedMessage = PreparedMessage> {
202204 //...
203205
204206 prepareTransport(log: T): T[] {
@@ -233,7 +235,9 @@
233235 Here is the default implementation of the `format` step:
234236
235237 ```ts
236-export abstract class BaseTransport {
238+export abstract class BaseTransport<
239+ T extends PreparedMessage = PreparedMessage
240+> {
237241 formatters: Formatter[] = [addLevel(), addTimestamp(), colorize()];
238242
239243 //...