POC-VALIDATION and POC-PROCESS use the same filename and it isn't
supported to have two appenders use the same file. Is that the file
where you get the mixed logs?
On 4/27/06, Vin Karthik <[EMAIL PROTECTED]> wrote:
> This is my config file :
>
> # Configuration file for the logging properties.
> # The log level hierarchy for log4j is DEBUG < INFO < WARN < ERROR < FATAL
> # The name of the logger specified below should be passed as a parameter
> # while instantiating the logger.
> log4j.logger.RAPID = DEBUG, SMTPRAPID, RAPID, RAPIDROLL
> log4j.logger.POC-VALIDATION = DEBUG, POC-VALIDATION, SMTPPOC-VALIDATION
> log4j.logger.POC-PROCESS = DEBUG, POC-PROCESS, SMTPPOC-PROCESS
>
> ############# LOGGING FOR RAPID ################
> #RAPID ROLLING FILE LOGS
> log4j.appender.RAPIDROLL=org.apache.log4j.RollingFileAppender
> log4j.appender.RAPIDROLL.File=/home/test/log/rapid.log
> log4j.appender.RAPIDROLL.Append = true
> log4j.appender.RAPIDROLL.maxBackupIndex=10
> log4j.appender.RAPIDROLL.maxFileSize=1MB
> log4j.appender.RAPIDROLL.layout=org.apache.log4j.PatternLayout
> log4j.appender.RAPIDROLL.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss}
> %-5p %c %x - %m%n
>
> # SMTPRAPID is set to be a SMTPAppender.
> log4j.appender.SMTPRAPID = org.apache.log4j.net.SMTPAppender
> log4j.appender.SMTPRAPID.To = [EMAIL PROTECTED]
> log4j.appender.SMTPRAPID.Subject = "Smartbuy --> RAPID"
> log4j.appender.SMTPRAPID.BufferSize = 1024
> log4j.appender.SMTPRAPID.Threshold = WARN
> log4j.appender.SMTPRAPID.EvaluatorClass =
> com.hp.sb.interfaces.util.MailTrigger
> log4j.appender.SMTPRAPID.layout = com.hp.sb.interfaces.util.MailLayout
>
> ############# LOGGING FOR POCLOSE - VALIDATION ################
> ##POClose Validation Logs
> log4j.appender.POC-VALIDATION=org.apache.log4j.FileAppender
> log4j.appender.POC-VALIDATION.File=/home/test/log/${SBFILENAME}
> log4j.appender.POC-VALIDATION.Append = false
> log4j.appender.POC-VALIDATION.layout=org.apache.log4j.PatternLayout
> log4j.appender.POC-VALIDATION.layout.ConversionPattern=%d{yyyy-MM-dd
> HH:mm:ss} %-5p %x - %m%n
>
> # SMTPPOXML is set to be a SMTPAppender.
> log4j.appender.SMTPPOC-VALIDATION= org.apache.log4j.net.SMTPAppender
> log4j.appender.SMTPPOC-VALIDATION.To = [EMAIL PROTECTED]
> log4j.appender.SMTPPOC-VALIDATION.Subject = "PO CLOSE VALIDATION"
> log4j.appender.SMTPPOC-VALIDATION.BufferSize = 1024
> log4j.appender.SMTPPOC-VALIDATION.Threshold = DEBUG
> log4j.appender.SMTPPOC-VALIDATION.EvaluatorClass =
> com.hp.sb.interfaces.util.MailTrigger
> log4j.appender.SMTPPOC-VALIDATION.layout =
> com.hp.sb.interfaces.util.MailLayout
> ############# LOGGING FOR POCLOSE - PROCESS ################
> ##POClose Validation Logs
> log4j.appender.POC-PROCESS=org.apache.log4j.FileAppender
> log4j.appender.POC-PROCESS.File=/home/test/log/${SBFILENAME}
> log4j.appender.POC-PROCESS.Append = false
> log4j.appender.POC-PROCESS.layout=org.apache.log4j.PatternLayout
> log4j.appender.POC-PROCESS.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss}
> %-5p %c %x - %m%n
>
> # SMTPPOXML is set to be a SMTPAppender.
> log4j.appender.SMTPPOC-PROCESS= org.apache.log4j.net.SMTPAppender
> log4j.appender.SMTPPOC-PROCESS.To = [EMAIL PROTECTED]
> log4j.appender.SMTPPOC-PROCESS.Subject = "PO CLOSE PROCESS"
> log4j.appender.SMTPPOC-PROCESS.BufferSize = 1024
> log4j.appender.SMTPPOC-PROCESS.Threshold = DEBUG
> log4j.appender.SMTPPOC-PROCESS.EvaluatorClass =
> com.hp.sb.interfaces.util.MailTrigger
> log4j.appender.SMTPPOC-PROCESS.layout = com.hp.sb.interfaces.util.MailLayout
>
>
> James Stauffer <[EMAIL PROTECTED]> wrote:
> Can you send your complete config file? What are the various
> pScriptName values used? It appears that you are sending everything
> to both appenders and that is why you get things mixed.
>
> On 4/27/06, Vin Karthik wrote:
> > Here is the logger definition :
> >
> > log4j.logger.POC-VALIDATION = DEBUG, POC-VALIDATION, SMTPPOC-VALIDATION
> >
> > I do Logger.getLogger(pScriptName) also. But i still do this caching in
> > addition to it. When i dont specify the log directory for 1 program, it
> > puts the logs of the program in the other program's log file. This is
> > another issue which i face.
> >
> > James Stauffer wrote:
> > If you call Logger.getLogger() twice with the same parameter then the
> > same instance will be returned so there is no need to cache it.
> >
> > On 4/27/06, Vin Karthik wrote:
> > > I do a System set Property for the log file name and create them
> > > dynamically. I cache the logging instance so that the same program whihc
> > > is invoking the logger for the same instance the second time. The
> > > pScriptName variable is the name of the program invoking the logger.
> >
> > --
> > James Stauffer
> > Are you good? Take the test at http://www.livingwaters.com/good/
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> >
> > ---------------------------------
> > New Yahoo! Messenger with Voice. Call regular phones from your PC and save
> > big.
> >
>
>
> --
> James Stauffer
> Are you good? Take the test at http://www.livingwaters.com/good/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
> ---------------------------------
> New Yahoo! Messenger with Voice. Call regular phones from your PC and save
> big.
>
--
James Stauffer
Are you good? Take the test at http://www.livingwaters.com/good/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]