Thanx Leo, I completely agree with you and the design of ConsoleLogger. I am already using the StreamTarget for System.out.So to use the ConsoleLogger as a separate entity (in case of the StreamTarget failure and getting information for loglevel from the configuration)one has to do his mapping for the loglevels. I thought this functionality was missing from ConsoleLogger. :-)
Raj -----Original Message----- From: Leo Sutic [mailto:[EMAIL PROTECTED]] Sent: Monday, April 08, 2002 6:19 PM To: Avalon Developers List Subject: RE: Mismatch of loglevels in ConsoleLogger and Priority class Rajendra, I would recommend that you use LogKit with a StreamTarget set to System.out instead. That has a similar effect, and you get better formatting. For cases when LogKit is broken, just log as DEBUG - it's not like we expect that to happen. That String->Int mapping would be tied to LogKit's string->int mapping, so I'm not that keen on it either. I think the best for you would be to take care of the mapping yourself. /LS > From: Ghorpade, Rajendra [mailto:[EMAIL PROTECTED]] > > 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 -- 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]>