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
For certain messages, it's not interesting where they originate from (file:line). One example would be startup messages:
logger.info("We're up and running"); // the filepath:line is not interesting
Fortunately, though this is undocumented, .addTransform also receives the file:line as an object. I've tried adding a transform to suppress the line, but if it returns the empty string, the file:line is still output:
importloggerfrom'bristol';logger.addTarget('console').withFormatter('human');logger.addTransform(e=>e.file&&e.line ? '' : e);logger.info('Started!');// [2018-07-12 16:19:36] INFO: Started (file:///...:6)
Returning a whitespace is better, though because the file:path object is the first passed on to transform functions, this will lead to an extra whitespace in the middle of your output:
However, I would like to point out that if you specify your project's root folder option with palin, the paths become very short which may be sufficient for you.
For certain messages, it's not interesting where they originate from (file:line). One example would be startup messages:
Fortunately, though this is undocumented,
.addTransform
also receives the file:line as an object. I've tried adding a transform to suppress the line, but if it returns the empty string, the file:line is still output:Returning a whitespace is better, though because the file:path object is the first passed on to transform functions, this will lead to an extra whitespace in the middle of your output:
The text was updated successfully, but these errors were encountered: