Discussions

General J2EE: Multiple Log files

  1. Multiple Log files (1 messages)

    Hi, Here is my dir structure c:\projects\test.pdf c:\projects\myfile.bmp i am writing program which will read this file name.Based on the file extension i have to log the file name in different log file Ex: test.pdf should be in pdf.log myfile.bmp should be written to bmp.log here is my log4j properties log4j.rootLogger=DEBUG, pdf, bmp log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - %n log4j.appender.pdf=org.apache.log4j.RollingFileAppender log4j.appender.pdf.File=c:/projects/pdf.log log4j.appender.pdf.MaxFileSize=10MB log4j.appender.pdf.MaxBackupIndex=5 log4j.appender.pdf.layout=org.apache.log4j.PatternLayout log4j.appender.pdf.layout.ConversionPattern=%d %p [%c] - %n log4j.appender.bmp=org.apache.log4j.RollingFileAppender log4j.appender.bmp.File=c:/projects/bmp.log log4j.appender.bmp.MaxFileSize=10MB log4j.appender.bmp.MaxBackupIndex=5 log4j.appender.bmp.layout=org.apache.log4j.PatternLayout log4j.appender.bmp.layout.ConversionPattern=%d %p [%c] - %n but it is writing both file names in both log files. Help me to resolve this
  2. Re: Multiple Log files[ Go to top ]

    check this out... http://www.theserverside.com/discussions/thread.tss?thread_id=31659