-
How to use and configure log4j in cluster environment ? (8 messages)
- Posted by: Asha Balasubramanyan
- Posted on: November 01 2001 16:26 EST
I want to use log4j in weblogic cluster enviornment. Please share your thoughts and experiences on this.
AshaThreaded Messages (8)
- How to use and configure log4j in cluster environment ? by David Hanna on November 02 2001 16:35 EST
- How to use and configure log4j in cluster environment ? by Mick Knutson on November 16 2001 19:11 EST
- Re: How to use and configure log4j in cluster environment ? by Srecko Mandelj on July 31 2008 09:43 EDT
-
Re: How to use and configure log4j in cluster environment ? by Ruslan Zenin on March 26 2009 02:50 EDT
- Re: How to use and configure log4j in cluster environment ? by Matt Byrne on January 27 2011 09:35 EST
-
Re: How to use and configure log4j in cluster environment ? by Ruslan Zenin on March 26 2009 02:50 EDT
- How to use and configure log4j in cluster environment ? Syslog by Jing Wang on February 04 2011 14:38 EST
- log4j in clustered env by a s on June 20 2012 15:18 EDT
- reply by Kenneth Griffin on July 07 2012 09:56 EDT
-
How to use and configure log4j in cluster environment ?[ Go to top ]
- Posted by: David Hanna
- Posted on: November 02 2001 16:35 EST
- in response to Asha Balasubramanyan
If I understand your request, you want to centralize logging in a multi-server, clustered environment.
I guess there could be a couple of options
1. Log to a database.
2. Use JMS to log to a queue. If I remember correctly, WL, since 4.51, comes with a message queue server. -
How to use and configure log4j in cluster environment ?[ Go to top ]
- Posted by: Mick Knutson
- Posted on: November 16 2001 19:11 EST
- in response to David Hanna
Without creating a 3rd server, how would you use WL's JMS server to centralize the logging? Wouldn't it be like using JMS on each machine as a Log4J appender to mearly log to a central data store?
-
Re: How to use and configure log4j in cluster environment ?[ Go to top ]
- Posted by: Srecko Mandelj
- Posted on: July 31 2008 09:43 EDT
- in response to David Hanna
I know it is an old thread, but maybe someone will need the solution I'm using. I configure file appender so that it uses weblogic.Name system property that is set by default inside weblogic server. In that case I have separate log4j files for different servers. The configuration looks like this: -
Re: How to use and configure log4j in cluster environment ?[ Go to top ]
- Posted by: Ruslan Zenin
- Posted on: March 26 2009 14:50 EDT
- in response to Srecko Mandelj
I know it is an old thread, but maybe someone will need the solution I'm using. I configure file appender so that it uses weblogic.Name system property that is set by default inside weblogic server. In that case I have separate log4j files for different servers. The configuration looks like this:
Hi Srecko, Would this substitution ${weblogic.Name} work for log4l.properties? Or it works only in xml config files? BTW, do you have any suggestion if one wanted to use one common file (DailyRollingFileAppender) placed in shared folder (mount point)? What we observe is that one instance rolls on file to a new day, but other instance still writing to the previous day logs...any solution for this? Log4j socket server can't be used since it is not fault tolerant (e.g. if socket server down or box it is running on down - we have no logs)
-
Re: How to use and configure log4j in cluster environment ?[ Go to top ]
- Posted by: Matt Byrne
- Posted on: January 27 2011 21:35 EST
- in response to Ruslan Zenin
Old post, but just to let you know, ${weblogic.Name} works fine in log4j.properties. Best to keep log files separate in a cluster so it's easier to trace what each server is doing, concurrency issues, etc.
Example line:
log4j.appender.MyLog.File=/path/to/logfile/log-${weblogic.Name}.log
-
How to use and configure log4j in cluster environment ? Syslog[ Go to top ]
- Posted by: Jing Wang
- Posted on: February 04 2011 14:38 EST
- in response to Asha Balasubramanyan
Performance will surfer if log directly into a DB. Syslog is a common tool used by many companys. Scribe is another one develop and used by facebook.
-
log4j in clustered env[ Go to top ]
- Posted by: a s
- Posted on: June 20 2012 15:18 EDT
- in response to Asha Balasubramanyan
-
reply[ Go to top ]
- Posted by: Kenneth Griffin
- Posted on: July 07 2012 09:56 EDT
- in response to Asha Balasubramanyan
This might help you
The steps involved in using log4j are:
1. Write a configuration file. In this file:
- Specify the level of the root logger and attach an appender to it.
- Specify the properties of the appender.
- Specify a layout for the appender.
2. In your code, acquire a logger by class or name. Typically, this should be the logger associated with the current class.
3. Start logging using any of the methods of the logger you acquired in step 2 (log.debug(), log.info(), log.warn(),log.error(), log.fatal()).