7max / log4cl

Common Lisp logging framework, modeled after Log4J
Apache License 2.0
103 stars 32 forks source link

Binary logging idea #12

Open 7max opened 11 years ago

7max commented 11 years ago
  1. Add a new log level like attribute to each logger state, called binary log level, that follows exactly same inheritance rules as regular log level.
  2. When performing a check whenever any logging is to be performed, in (logging-enabled-for), consult both regular log level and binary log level.
  3. Change appender-do-append generic will gain an extra argument, orig-args-vector
  4. orig-args-vector will be initialized, for log statements with the format control string, as all arguments to the format call. For expression logging , it will be all arguments in order.
  5. The vector will only be created at call site, if there there were any binary log level reachable, so if no binary log levels reachable, it will be

This will allow people to write binary binary appenders, that examine the actual arguments, and not their textual representation..

One example would be writing the the binary representation of each log statement arguments into a binary log file, with additional tools that analyze the file. This method should be much faster both at runtime, and at analyzing part, due to no need for formatting arguments into text

danlentz commented 11 years ago

Or, minimally, something equivalent to the ring-messenger concept in cl-log?

7max commented 11 years ago

I'll make a binary logging branch on weekend and see if I can hammer out above in a few days.. Should not be too problematic because it will be basically parallel to the existing log level logic

scymtym commented 10 years ago

Is implementing this feature still planned?