Closed YouriT closed 5 years ago
Sorry for not replying to this earlier - was on vacation when you raised it, and I missed it.
How are you getting an ISOString out of bunyan? What version of bunyan are you using? Easy enough to add a date = new Date(date)
here if we need to, though.
I think by adding time variable will fix this issue.
const bunyanDebugStream = require('bunyan-debug-stream');
// stream: process.stdout,
const stream = bunyanDebugStream({
basepath: __dirname, // this should be the root folder of your project.
forceColor: true,
});
streams = [{
level: level || 'debug',
type: 'stream',
stream,
}];
}
const logger = bunyan.createLogger({
name: app,
time: Date,
streams
});
Same issue here... using bunyan@^1.8.12
:tada: This issue has been resolved in version 1.1.1 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
@benbriadeploy , I was just passing by... you rock 👍
@benbriadeploy is a robot. :) But no problem.
Also, I fixed this by making it so if entry.time
is not a Date, then we just call toString()
on it, which might be fantastically ugly (I have no idea how all of you are getting non-Dates into this field, so I don't know what to do here. :P) But, I also just added a feature in 2.0.0 that makes it so you can do something like:
new BunyanDebugStream({
showDate: (time, entry) => return time.toISOString()
});
and then you can specify whatever kind of date format you want.
Getting an error with this module on version
1.0.7
Here it is:The error references to the fact that in this file you do a
date.get...
butdate
is an ISOString and not an object.Thanks for this great work!