Closed faassen closed 3 years ago
Reading the readme, I find the following:
const { Logger, Level, processors, transports, } = require('tripitaka'); const { context, error, timestamp, json } = processors; const { json, human } = transports; const logger = new Logger({ level: Level.INFO, processors: [ context(), error(), timestamp(), process.env.NODE_ENV === 'production' ? json() : human(), ], transports: [ stream(), ], })
Here we're importing a json processor and the json transport, which won't work.
json
In addition I am confused by the usage; we import a human transport but it's used as a processor. And stream isn't being imported.
human
stream
My bad. Both human and json are processors, not transports. Will fix.
Fixed.
Reading the readme, I find the following:
Here we're importing a
json
processor and thejson
transport, which won't work.In addition I am confused by the usage; we import a
human
transport but it's used as a processor. Andstream
isn't being imported.