From: Salve J N. <sal...@me...> - 2005-02-24 11:57:43
|
Chris Winters wrote: > I've been rewriting the error module to work with the filesystem instead > of the database. That part is (mostly) done, but my initial idea of > hooking this to log4perl with a custom appender has hit a little snag. > > - If we set the threshold to 'FATAL' we don't store anything -- nothing > is logged with a 'FATAL' level. This doesn't necessary have to be a bad thing... Are there any situations that should be fatal to OI2? e.g. missing critical dependencies, inability to contact critical databases, badly broken (truncated?) primary config files, inability to access local files at all (broken filesystem.) At this level, I hope never to get any output to the log files. :) > - If we set the threshold to 'ERROR' we store a ton of messages, too > many to be useful. Do _all_ these messages deserve an "ERROR" status, or are some of them only informational? The ones that actually _are_ errors, should of course be fixed. :) > This is my fault for not setting guidelines in the beginning as to what > the different logging levels should mean. I don't have a good feel for > how other people do this, so before I go through and try and make > everything at least roughly consistent I'd like to hear what you think: > > What are appropriate messages to log at these levels? Ok, here's my interpretation (With "most important" first :) > FATAL Fatalities (death). Situations where the system/application cannot continue safely and must abort. Manual intervention is necessary to get things running again. (Hopefully, this is something you'll never need to see. :) > ERROR Actual errors that need to be looked into. The application should be able to continue running despite having these errors, but should probably tell the user why the expected data can't be delivered. > WARN For situations that at some point later may lead to errors. E.g. missing directories, use of default values in system-dependent configuration (e.g. when using a default IP address of 127.0.0.1, when it should have been defined explicitly in some config file.) > INFO High/Coarse-level status messages. I try to use this to tell when important subsystems are used, and what data they recieve/pass along. > DEBUG Detailed status messages, debugging, and all the rest. Personally I'd like several debug levels, but existing logging frameworks like syslog(1) and log4* seem to disagree with me. :) > PS - Would it be useful to post here a periodic status message as to how > OI2 is doing? Yes, please do! :) - Salve -- Salve J. Nilsen <salvejn at met dot no> / Systems Developer Norwegian Meteorological Institute http://met.no/ Information Technology Department / Section for Development |