On Fri, 2007-01-05 at 10:22 +0100, DECAFFMEYER MATHIEU wrote: > > Hi, > > I'm using Log4j to manage log, I want to convert this by Commons > Logging by > converting just this line : > private static Logger sLogger = > Logger.getLogger(LoggingManager.class); > by this one : > private static Log sLogger = LogFactory.getLog(LoggingManager.class); > This is the only thing to do, right ?
Yep, those are all the code changes you need, and in most cases there are no config file changes needed either. The only case where you may need to do more are where the code is running inside a j2ee container or similar, and there are multiple copies of various logging libraries floating around. > Now I have a problem : logs aren't stored in files anymore. > Why doesn't it store anymore since I replaced this line to use Commons > Logging ? At a guess, there are multiple copies of log4j in your classpath, and commons-logging is finding one that does not have access to your log4j configuration file. Enable commons-logging diagnostic output and see what log4j jarfile is being detected by commons-logging. Regards, Simon --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
