The "bottleneck" as you refer to it is limited to enabled statements.  Under
normal conditions very few if any enabled logging statements execute in an
application.  Typically DEBUG is turned off and often INFO is turned off.
The other levels aren't executed unless errors or unusual conditions occur
in an application.  The exposure is therefore quite limited and not worthy
of much concern.

I guess what I'm trying to say is that the concern you raise is technically
correct but the impact in the real world is small.

Mike

-----Original Message-----
From: Anil Philip [mailto:[EMAIL PROTECTED]
Sent: Monday, February 07, 2005 1:12 PM
To: 'Log4J Users List'
Subject: RE: multi-threading and log4j - bottleneck?


Thanks for your reply.
Assuming the calls are enabled, then will not there be a synchronizing
bottleneck introduced?
The threads were supposed to synchronize among themselves as part of their
application logic.
But now they are synchronizing because of logging.
Thanks,
Anil Philip


-----Original Message-----
From: Lutz Michael [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 07, 2005 11:42 AM
To: 'Log4J Users List'
Subject: RE: multi-threading and log4j - bottleneck?



A call is enabled if its level (e.g. FATAL, ERROR, etc.) is at least as
great as the closest logger's configured level in its hierarchy.

So for instance, if I configure the root logger at WARN, then WARN, ERROR,
and FATAL are enabled, INFO and DEBUG are not.

So in a running system most calls are disabled, so the impact of
synchronizing on Log4j calls is essentially a non-issue.  Only enabled calls
are synched.

Mike

-----Original Message-----
From: Anil Philip [mailto:[EMAIL PROTECTED]
Sent: Monday, February 07, 2005 12:17 PM
To: 'Log4J Users List'
Subject: RE: multi-threading and log4j - bottleneck?


What is "enabled call"?

-----Original Message-----
From: Lutz Michael [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 07, 2005 11:26 AM
To: 'Log4J Users List'
Subject: RE: multi-threading and log4j - bottleneck?



A synchronized region is processed on enabled calls only.
Figuring out if a call is enabled or not is itself not synchronized.

-----Original Message-----
From: Anil Philip [mailto:[EMAIL PROTECTED]
Sent: Monday, February 07, 2005 12:06 PM
To: 'Log4J Users List'
Subject: multi-threading and log4j - bottleneck?


Hello,
If I have several threads running in a process; they may share a logger or
have separate loggers. But they all write to one log file.
e.g. logger.info();

Since log4j output to the file is quite neat even though interleaving
happens, I wondered if it uses file locks or synchronizes and if threads
waiting on this would create a bottleneck. Or is it asynchronous - the
threads simply write to a buffer and return and the buffer is written out
later (though writing to the buffer is synchronized)?

Thanks,
Anil Philip



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

----------------------------------------------------------------------------
---
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

----------------------------------------------------------------------------
---
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-------------------------------------------------------------------------------
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]

Reply via email to