I just recently implemented log4j in a prototype that I am developing, and it was very easy to setup and use. I blatently cut and paste the properties file in the article to my WEB-INF/classes directory and instantly had logging. The different Appenders included with log4j makes it very extensible. Eventually, I plan to switch from a FileAppender to a JMSAppender allowing us to process the logs with an MQ. All I will have to do is change the properties file to make this happen.
log4j rocks!
Discussion on:
View:
Show:
In a application,I create two Logger instances by two configfiles.When I call one Logger instance's logging method in the other Logger instance,but the first Logger's logging messages be writed to the file.log by the second Logger's configfile.Why?
Pls send the answer to my Email:lyg1021@sina.com
Thank u a lot!
Pls send the answer to my Email:lyg1021@sina.com
Thank u a lot!
How did U manage to put all the logger data in the log file. As for me right now, everything is on console window.
Any ideas??
Rocky
Any ideas??
Rocky
Bone, can you send me a copy of the properties you haev used for configuring the JMSAppender of log4j? I am badly in need of this information and unfortunately, i have not found enough documentation or help for this configuration in the internet so far. Can you please send me the copy of properties file section related to JMSAppender? Thanks in advance and regards
T. Bone -- do you use any log aggregation techniques, for pulling logs together from multiple Log4j enabled applications. It would be good to know what some of the options are and what works best.
Hi,
that was a great effort that you did by appending the JMSAppender, But i want to know the advantage and disadvantage of doing the same.
Please can you share what u think on the same.
that was a great effort that you did by appending the JMSAppender, But i want to know the advantage and disadvantage of doing the same.
Please can you share what u think on the same.
In a application,I create two Logger instances by two configfiles.When I call one Logger instance's logging method in the other Logger instance,but the first Logger's logging messages be writed to the file.log by the second Logger's configfile.Why?
Pls send the answer to my Email:lyg1021@sina.com
Pls send the answer to my Email:lyg1021@sina.com
Thanks a lot for sharing the article on cash. That's a awesome article. I enjoyed the article a lot while reading. Thanks for sharing such a wonderful article.
I want to say very thank you for this great informations. now i understand about it. Thank you !
I want to say very thank you for this great informations. now i understand about it. Thank you !
i am new to log4j and can any one help me that i want to know how to implement the to java application
pls any one can say about the log4j
great post man, indeed quite useful logging tips in java. In my opinion using correct logging level for different message is most important thing to learn and logging has important performance impact (ever found process running in DEBUG mode in production ) and has to be handled efficiently. I have also blogged my tips as 10 tips on logging in Java , let me know how do you find it.
- Keyboard Shortcuts:
- Prev
- Next
- Toggle









































