From: Twylite <tw...@cr...> - 2011-10-30 20:25:58
|
Hi, > 1. *Tcl_Log*(/interp/, /level/, /message/, ...) A log needs some sort of context (name, category, service, facility, parent log, or however you want to conceptualise it) to be useful in anything larger that a trivial system. I would strongly advise anyone developing a logging API to at least be familiar with Log4J (http://en.wikipedia.org/wiki/Log4j) and its Logger/Appender/Layout design, in particular the ability to attach multiple Appenders to a Logger. Log4J has had immense success in the Java world, and has been ported to C, C++, Perl, JavaScript, Ruby, Python, PHP, etc. I would also recommend that any logging interface have the capability to handle arbitrary "event data" fields independent of the message. Examples include the initiating user, and the target of the action. As system logs grow too large for effective reporting using 'grep' or 'awk' this additional information is necessary for building database indexes. The presence of such data also allows filters to be built for real-time alerting based on the logs. Regards, Twylite |