Hi Leo, I am using logkit for logging.Logger from the logkit is wrapped by the framework logger.I want to use a ConsoleLogger as the default logger (for example in the servlets or incase of logkit failure).Loglevel for this is taken from the configuration file or from the init params for the servlet.In this case I have to pass the loglevel to the ConsoleLogger depending on this configuration.There is no good way to pass the loglevel in *int* to the ConsoleLogger, so I use Priority class to convert the loglevel *String* to *int*.But due to mismatch I do not get the expected behavior.
Or should ConsoleLogger have the mapping between the Strings and int values? If so, above problem would be solved and also the classes would be kept decoupled. Raj -----Original Message----- From: Leo Sutic [mailto:[EMAIL PROTECTED]] Sent: Monday, April 08, 2002 3:51 PM To: Avalon Developers List Subject: RE: Mismatch of loglevels in ConsoleLogger and Priority class > From: Ghorpade, Rajendra [mailto:[EMAIL PROTECTED]] > > Hi All, > There is a mismatch between the log levels in > org.apache.avalon.framework.logger.ConsoleLogger and the > org.apache.log.Priority class. > Log levels have values of 0,1,2,3,4,5 in ConsoleLogger and Priority class > has them set to 5,10,15,20,25. > So ConsoleLogger will not log to correct log level if receives log level > from Priority. Rajendra, this is not by design, but not a bug either: The logger package abstracts away from the logger implementation, and is thus *not* tied to org.apache.log and need not work with Priority. Consider ConsoleLogger another logging package in itself, just like Log4J. I'd like to keep them (ConsoleLogger and LogKit) decoupled. If there is a reason to tie the levels in ConsoleLogger to LogKit Priority values, then I'll do the change, but it seems quite anti-abstraction. Plus, I think ConsoleLogger is growing a bit here and I'd like to keep it *very* minimal. Basically, if you need priority control - use LogKit. /LS -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>