The config file is as follows :
##POClose Validation Logs
log4j.appender.POC-VALIDATION=org.apache.log4j.FileAppender
log4j.appender.POC-VALIDATION.File=/home/test/log/${FILENAME}
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
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 <[EMAIL PROTECTED]> wrote:
Post your config.
Also, It appears that you are caching Logger instances. Why are you doing that?
On 4/27/06, Vin Karthik wrote:
> I missed few details in the previous mail.
>
> public static Hashtable mht = new Hashtable()
>
> mLogger is the class member variable.
>
> Vin Karthik wrote:
> Hi,
>
> I am facing a problem with log4j. I am running 2 seperate programs. Both the
> programs use different log files 1.txt and 2.txt respectively. When these
> programs(1 & 2) are run continuously, the log statements get logged in the
> same log file(1.txt). The logger instantiation piece of code is as follows :
>
> public static Logger getLogInstance(String pScriptName)
> {
> if(mht.get(pScriptName) != null)
> {
> mLogger = (Logger) mht.get(pScriptName);
> }
> else
> {
> mLogger = Logger.getInstance(pScriptName);
> mht.put(pScriptName,mLogger);
> }
> return mLogger;
> }
>
> The pScriptName variable is Unique. Not really sure why this is happening.
>
> Can someone please help me on this.
>
> Thanks
> Karthik
>
>
> ---------------------------------
> How low will we go? Check out Yahoo! Messenger's low PC-to-Phone call rates.
>
>
> ---------------------------------
> How low will we go? Check out Yahoo! Messenger's low PC-to-Phone call rates.
>
--
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]
---------------------------------
Yahoo! Mail goes everywhere you do. Get it on your phone.
---------------------------------
Blab-away for as little as 1ยข/min. Make PC-to-Phone Calls using Yahoo!
Messenger with Voice.