log4js-node / log4js-node

A port of log4js to node.js
https://log4js-node.github.io/log4js-node/
Other
5.79k stars 774 forks source link

Add the ability to provide inspection options #1041

Open rogerkjoy opened 4 years ago

rogerkjoy commented 4 years ago

The object tree depth on the console is insufficient for some uses. Need to be able to specify layout options for the message via the util's formatWithOptions parameter InspectOptions

log4js/lib/layouts.js: 165

  function formatMessage(loggingEvent) {
    return util.formatWithOptions({colors: true, depth: 3, compact: true, breakLength: 80, showHidden: true}, ...loggingEvent.data);
  }
rnd-debug commented 4 years ago

@rogerkjoy Hello. A pull request with a test would be welcome 😉

lamweili commented 2 years ago

Related to https://github.com/log4js-node/log4js-node/issues/1154