Hi Jake Thanks for your response.
When I sayd default configuration i mean the configuration of a newly installed tomcat, it is the default libraries and the default server.xml. By default tomcat does not include log4j.jar. If I start tomcat with this newly installed configuration there are serveral logs in /logs: stdout_[DATE].log jakarta_service_[DATE].log stderr_[DATE].log manager_[DATE].log localhost_[DATE].log host-manager_[DATE].log catalina_[DATE].log admin_[DATE].log And system logs on most of them, including catalina_[DATE].log After including log4j.jar in the commons/lib system no longer wrote data on the catalina_[DATE].log and I'd like to get the same information I get before add the log4j.jar. Is it possible ? In your configuration the date of the file names dissappear, isn't it ? This log4j.jar was added later in order to be used by our applications. Each application implements its log4j.properties. Thanks a lot. ________________________________ Oscar Segarra Àrea de Tecnologies de la Informació i les Comunicacions Departament de la Presidència Generalitat de Catalunya C/ Sant Honorat, 1, 08002 - Barcelona Tel. 934 02 48 34 email: [EMAIL PROTECTED] -----Missatge original----- De: Jacob Kjome [mailto:[EMAIL PROTECTED] Enviat: dimecres, 29 / agost / 2007 20:04 Per a: Log4J Users List Tema: Re: catalina logging stopped after install log4j.jar On Wed, 29 Aug 2007 19:20:16 +0200 Oscar Segarra Rey <[EMAIL PROTECTED]> wrote: > Hi, > > > > I have reinstalled tomcat5.5.23 in a tomcat clustered environment in a W2003 >SP2 operating system. > > > > With the default configuration everything worked perfectly but due to >developement requirements I had to put log4j.jar in the commons\lib path and >afterwareds system no longer wrote on my catalina.[DATE].log file. > > What do you mean the "default configuration"? Are you saying that you didn't use Log4j before? In order for Tomcat to use Log4j (in Tomcat 5.5.xx, at least, it's different tin 6.xx) you need log4j.jar and commons-logging.jar in common/lib. Then you need log4j.properties in common/classes. > > What's happening ? > > Is there any way to configure log4j.properties in order to get the same >loggin information in the same file ? > Sure. Define a DailyRollingFileAppender. Or, if you start up using the Windows Servive, just define a ConsoleAppender and the service will take care of the log file (by date, just as you want it to be). Here's the essence of my config file (notice that I use the Windows Service and use the log to ConsoleAppender technique just described)... log4j.appender.A1=org.apache.log4j.ConsoleAppender log4j.appender.A1.layout=org.apache.log4j.PatternLayout log4j.appender.A1.layout.ConversionPattern=%-5p [%-8.8t]: %39.39c %-6r - %m%n log4j.appender.LOCALHOST=org.apache.log4j.RollingFileAppender log4j.appender.LOCALHOST.File=${catalina.base}/logs/localhost.log log4j.appender.LOCALHOST.MaxFileSize=1000KB log4j.appender.LOCALHOST.MaxBackupIndex=1 log4j.appender.LOCALHOST.layout=org.apache.log4j.PatternLayout log4j.appender.LOCALHOST.layout.ConversionPattern=%-5p [%-8.8t]: %39.39c %-6r - %m%n log4j.appender.MYAPP=org.apache.log4j.DailyRollingFileAppender log4j.appender.MYAPP.File=${catalina.base}/logs/localhost_myapp.log log4j.appender.MYAPP.DatePattern='.'yyyy-MM-dd log4j.appender.MYAPP.layout=org.apache.log4j.PatternLayout log4j.appender.MYAPP.layout.ConversionPattern=%c{1} %-6r - %m%n log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/myapp]=INFO, MYAPP log4j.additivity.org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/myapp]=false log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost]=INFO, LOCALHOST log4j.additivity.org.apache.catalina.core.ContainerBase.[Catalina].[localhost]=false log4j.rootLogger=INFO, A1 Jake --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
