New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
util.format options need #1139
base: master
Are you sure you want to change the base?
util.format options need #1139
Conversation
function colouredLayout(loggingEvent) { | ||
return timestampLevelAndCategory(loggingEvent, loggingEvent.level.colour) + util.format(...loggingEvent.data); | ||
function colouredLayout(loggingEvent) { | ||
return timestampLevelAndCategory(loggingEvent, loggingEvent.level.colour) + util.formatWithOptions({depth: 4}, ...loggingEvent.data); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@thegobot Your changes don't make it able to be changed, or am I missing something?
It would still not work for people requiring more depths.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem is that your logger doesn't print objects with depth > 2 (default in util.inspect depth = 2)
I believe that you need to move the settings of formatWithOptions in the config
logger.debug(util.formatWithOptions({ depth: 5 }, myObject));
I understand, but it's not convenient
@thegobot Would using Using your changes (hard-coded to
|
options to config...
Can't change depth now