eugeny-dementev / winston-console-formatter

Pretty print console formatter in yaml like style
MIT License
24 stars 10 forks source link

Add config #1

Closed dabulashvili-zz closed 6 years ago

dabulashvili-zz commented 8 years ago

Can you add configs to present meta and stack. Like that:

logger.add(winston.transports.Console, toYAML.config({
    metaLevel: 'warning', // or printMeta: true
    stackLevel: 'error' // or printStack: true
}));

I think it will be more usefull.

eugeny-dementev commented 8 years ago

@DatoBula, thank you, good idea. metaLevel/stackLevel looks really useful. You can rewrite your PR to this type options and i merge it. With tests please. Or i can do it by myself, but next week.

dabulashvili-zz commented 8 years ago

OK, I'll try to change options and create new PR.

eugeny-dementev commented 6 years ago

Added in 1.0.0-beta.0

{
  stackTrace: Boolean,
  meta: Boolean,
}