To answer your first questions read the Log4j short manual - http://logging.apache.org/log4j/docs/manual.html. Answers to your questions and more that you'll likely ask are in there.
Log4j is thread-safe, this is well-documented. What is a problem is logging to the same file from multiple JVMs. This is not a problem with Log4j but rather a result of how file IO works. Consider partitioning your output files with some naming convention, or use another appender (like JMS as is mentioned in the link you supplied) -----Original Message----- From: H N [mailto:[EMAIL PROTECTED] Sent: Monday, January 17, 2005 1:33 PM To: [email protected] Subject: Audit logging in Log4J in J2EE application/synchronization Hi, I am planning to use Log4J in my J2EE application to log all messages. There are 2 things which I wanted to clarify. If some one can give feedback then it will be really helpful to me. Audit Logging: Whenever some user login/logout, I want to capture the details of login in log file and I don't want this to be turned OFF. I also want to log other stuff like debug, error etc. How can I achieve such audit logging? Synchronization issue: I have seen some feedback which says that log4J is not a good solution for J2EE due to synchronization issues. (http://www.theserverside.com/discussions/thread.tss?thread_id=25163) If there are multiple users and all are using the application at the same time then how will Log4J handle the update of the log file? If it is updating for one user then the file will be locked so how will the log of other user be done? If someone can give feedback then I will highly appreciate. Thanks and Regards, HVN --------------------------------- Do you Yahoo!? All your favorites on one personal page - Try My Yahoo! ------------------------------------------------------------------------------- This message and any included attachments are from Siemens Medical Solutions USA, Inc. and are intended only for the addressee(s). The information contained herein may include trade secrets or privileged or otherwise confidential information. Unauthorized review, forwarding, printing, copying, distributing, or using such information is strictly prohibited and may be unlawful. If you received this message in error, or have reason to believe you are not authorized to receive it, please promptly delete this message and notify the sender by e-mail with a copy to [EMAIL PROTECTED] Thank you --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
