From: Bruce W. <br...@mi...> - 2004-05-15 20:10:26
|
I'm not familiar with LOG4J, so probably don't know what I'm missing! I'll include your new module with the next release, thanks. Bruce -----Original Message----- Howdy All, Thanks for all of the great input and code! By building on the infrastructure already within MH (Generic_Item.pm) and borrowing a little from Java (LOG4J), I believe we can have a much more robust logging mechanism. Example: kitchen.pl $kitchen_log =3D new Logger(); # Can be set via web interface, telnet, voice, etc. $kitchen_log->set('warn'); $kitchen_log->fatal('print a fatal msg'); # prints $kitchen_log->error('print an error msg'); # prints $kitchen_log->warn('print a warning msg'); # prints $kitchen_log->info('print an info msg'); # does not print $kitchen_log->debug('print a debug msg'); # does not print $kitchen_log->trace('print a trace msg'); # does not print The default method of printing messages does a print_log with the log lev= el displayed, but can be overridden to do whatever you want (e.g. send AIM o= n error). Please see the attached file Logger.pm for details. I=92m not sure if I = am overly complicating logging, but I=92m hoping ya=92ll will help clarify i= t for me. Thanks, -Steven !DSPAM:40a18ac397395078190240! |