You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a library we use to massage messages into a format our logs use, lets call it logMe
Something like:
function logMe(data1, data2) {
bunyan.info(data2, data1)
}
(Obviously a little more complicated than this, but yeah)
This works fine, but screws up the src param when it's enabled, it always points to the line where logMe is defined.
What do you think about being able to pass in a skipSrc param (or named something else, naming is hard) that skips n frames at the top of the list when processing the current stack trace?
The text was updated successfully, but these errors were encountered:
You can also .bind() extra variables if you'd like; this._bunyanLogger[level].bind(this._bunyanLogger, 'My custom logging prefix.'), but then you might also want to look at bunyan's child loggers.
We have a library we use to massage messages into a format our logs use, lets call it
logMe
Something like:
(Obviously a little more complicated than this, but yeah)
This works fine, but screws up the
src
param when it's enabled, it always points to the line wherelogMe
is defined.What do you think about being able to pass in a
skipSrc
param (or named something else, naming is hard) that skipsn
frames at the top of the list when processing the current stack trace?The text was updated successfully, but these errors were encountered: