I'm adding more extensive logging to some server apps, and it would be helpful to hear your opinions about formats.

I'm tempted to use the Extended Log Format commonly used by Apache and many other server apps:
http://www.w3.org/TR/WD-logfile.html

I like the attraction of being able to say that my logs conform to a well-regarded standard.

But on the flipside, I think that standard is crap. :)

Most of it's not bad, but the time part of it is horrible, with timestamps expressed like:

   [17/Jan/2015:00:06:48 -0500]

I'd prefer to use LC's internet date format:

   Sat, 17 Jan 2015 12:01:35 -0800

Many log analysis workflows use sed or awk, which make it easy to work with white space as delimiters. But since both time formats are multi-word expressions, the brackets are needed to identify the boundaries of the timestamp.

At a minimum I'm tempted to leave off the brackets, and to use LC's internet date format instead of the format logs commonly use, which may be slightly more compact but isn't automatically convertible into other formats with LC's convert command, requiring extra processing when looking for date ranges.

Going further, I'm inclined to consider tabs as delimiters rather than spaces, so multi-word values like the timestamp and conceivably others can be quickly identified as a single chunk.

Right now most of the log analysis done with these apps is done in other LiveCode-based tools, so it would seem the choice is easily in favor of a custom format optimized for parsing and sorting in LC.

But in all fairness, it's usually a good move to adopt common standards whenever possible, even at some cost to efficiency, since it allows the possibility of interoperability with other tools down the road if needed.

What would you do?

--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 ____________________________________________________________________
 ambassa...@fourthworld.com                http://www.FourthWorld.com

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to