indexzero/winston — Issue #58: Make it possible to serialize log metadata with JSON.stringify (for non-JSON inputs)
Author: ypocat
Created: 2011-10-13 20:54:31+00:00
State: open

Please make it configurable to serialize log metadata with JSON.stringify (for non-JSON inputs).

Currently the same can be achieved by overriding `require('winston/lib/winston/common').serialize = JSON.stringify;` - but of course that's a hack.

The current serialization algorithm (key=val, ...) for Loggly (but applies also to Console, etc.), may not be the best one for more complex objects, where JSON.stringify will do just fine.

The current serialization algorithm also produces ', , , , ,' output when serializing an object which contains multiple empty sub-objects.