suggestion for logEvent format

currently coldbox.system.logging.LogEvent.cfc has a method
"getExtraInfoAsString" which uses toString() to stringify complex
objects (structs/arrays etc)

Could this be changed from returning info.toString() to perhaps
serializeJSON(info) ?

Reason being is that the serialised format output by toString isn't
really all that useful in terms of not being able to easily
deserialize it for output. Second case is that if info is actually a
component (object) reference then serializeJSON will return something,
whereas toString() will throw an error if the object doesn't implement
a toString method.

So basically change from tostring to serialized json?

Sounds good to me. I’ve been converting all my complex values to JSON as I pass to LogBox. That would save me a step :slight_smile:

Anyone for XML, as a bit more human readable?

Dave

this maybe sounds like a feature request for the next version of logbox. How about adding a new property to the major Appenders like so:

extraInfoConversion = “xml,json,plain” which defaults to plain.

This way, you can tell any Appender what conversion to use for extra info granularly?

Luis F. Majano
President
Ortus Solutions, Corp

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

sounds good to me -- for the time being I've just extended the DB
Appender and overridden the method which writes the DB record