Map Lookup Question

2012-12-21 Thread Michael Minella
I'm looking at the log4j 2 's thread specific features and had a question. In my code I set an id as follows: ThreadContext.put( id , Main ); and attempt to reference it in my configuration file as shown below: File name = File fileName = /tmp/myLog.log PatternLayout pattern =

Re: Map Lookup Question

2012-12-21 Thread Ralph Goers
I know this isn't intuitive but you need to add a second '$ and make it $${ctx:id}. This is because the variables are replaced first when the configuration file is read. However, you want this variable to be resolved at runtime, not when the configuration is parsed. With two dollar sign

Re: Map Lookup Question

2012-12-21 Thread Ralph Goers
Hmm. I just noticed that your question is about the file name. Are you running with beta3? I thought that issue had been brought up in an earlier beta and fixed. Ralph On Dec 21, 2012, at 4:23 PM, Michael Minella wrote: I'm looking at the log4j 2 's thread specific features and had a

Tomcat Cluster syslog appender, Instance Id in Log

2012-12-21 Thread raja_s_patil
Hello, I have two servers each running 3 instances of Tomcat 7. We have used Log4j for logging with syslogappenders which send log to Logging server in LAN. The setup is logging perfectly no problems. We want to improve this set up and would like to have some information to be attached to each

Re: Tomcat Cluster syslog appender, Instance Id in Log

2012-12-21 Thread oshimat
Have you attached your log4j.xml and rsyslog conf ?, I don't see 'em. --Original Message-- From: raja_s_patil To: log4j-user@logging.apache.org ReplyTo: Log4J Users List Subject: Tomcat Cluster syslog appender, Instance Id in Log Sent: Dec 22, 2012 05:54 Hello, I have two servers each