One correction: I am using RollingFileAppender

Rafael Thomé Guimarães
Analista-Programador
DO-CBCN / DI-CRAD - MIDDLEWARE
' +55 11 2565-7006
* [email protected]<mailto:[email protected]>
[cid:[email protected]]

www.bmfbovespa.com.br<http://www.bmfbovespa.com.br/>


[cid:[email protected]]Evite imprimir. Colabore com o Meio 
Ambiente!



From: Rafael Thome Guimaraes [mailto:[email protected]]
Sent: quinta-feira, 5 de setembro de 2013 19:33
To: Log4NET User
Subject: RE: Thread Safety in Log

Very Convenient in deed. Thank you very much, Todd!

But I am asking because I am running into a disturbing issue (at least for me).
I have a Pattern layout appender that, in some cases, is trimming the message.

At first I thought I was reaching some kind of buffer limit, but than I noticed 
I have longer messages logged OK in the same file.

Than, since the logger application is a per call instancing multiple 
concurrency WCF service, I supposed if log4net was not Thread Safe, the rest of 
the trimmed message could be somewhere behind in the file and other threads 
messages colud be in the middle. Being very big messages I was not able to find 
it.

But If log4net is thread safe, what can be happaning?

Can someone help me?

The pattern I am using is: "%-20.20level %-30.30date{dd/MM/yyyy HH:mm:ss,fff}   
     %username [Thread: %thread]        (%logger - %file:%line)        
%message%newline"

Attached I am sending a file where it happened at line 9.

Note that %message is carrying a very long message with its particular layouT, 
wich is being generated trough c# code.

Thank you in advance,
Rafael Thomé Guimarães
Analista-Programador
DO-CBCN / DI-CRAD - MIDDLEWARE
' +55 11 2565-7006
* [email protected]<mailto:[email protected]>
[cid:[email protected]]

www.bmfbovespa.com.br<http://www.bmfbovespa.com.br/>


[cid:[email protected]]Evite imprimir. Colabore com o Meio 
Ambiente!



From: Todd Bradley [mailto:[email protected]]
Sent: quinta-feira, 5 de setembro de 2013 19:03
To: Log4NET User
Subject: RE: Thread Safety in Log

Let me direct you to the very convenient log4net FAQ:

http://log4net.sourceforge.net/release/1.2.0.30316/doc/manual/faq.html#thread-safety



From: Rafael Thome Guimaraes [mailto:[email protected]]
Sent: Thursday, September 05, 2013 2:49 PM
To: Log4NET User
Subject: Thread Safety in Log

Hi all!

Anyone knows if Log4Net is Thread Safe or I need to put locks in the calls?

Tks,
Rafael Thomé Guimarães
Analista-Programador
DO-CBCN / DI-CRAD - MIDDLEWARE
' +55 11 2565-7006
* [email protected]<mailto:[email protected]>
[cid:[email protected]]

www.bmfbovespa.com.br<http://www.bmfbovespa.com.br/>


[cid:[email protected]]Evite imprimir. Colabore com o Meio 
Ambiente!

________________________________

Esta mensagem pode conter informação confidencial e/ou privilegiada. Se você 
não for o destinatário ou a pessoa autorizada a receber esta mensagem, não 
deverá utilizar, copiar, alterar, divulgar a informação nela contida ou tomar 
qualquer ação baseada nessas informações. Se você recebeu esta mensagem por 
engano, por favor avise imediatamente o remetente, respondendo o e-mail e em 
seguida apague-o. Agradecemos sua cooperação.

This message may contain confidential and/or privileged information. If you are 
not the addressee or authorized to receive this for the addressee, you must not 
use, copy, disclose, change, take any action based on this message or any 
information herein. If you have received this message in error, please advise 
the sender immediately by reply e-mail and delete this message. Thank you for 
your cooperation.

________________________________

Esta mensagem pode conter informação confidencial e/ou privilegiada. Se você 
não for o destinatário ou a pessoa autorizada a receber esta mensagem, não 
deverá utilizar, copiar, alterar, divulgar a informação nela contida ou tomar 
qualquer ação baseada nessas informações. Se você recebeu esta mensagem por 
engano, por favor avise imediatamente o remetente, respondendo o e-mail e em 
seguida apague-o. Agradecemos sua cooperação.

This message may contain confidential and/or privileged information. If you are 
not the addressee or authorized to receive this for the addressee, you must not 
use, copy, disclose, change, take any action based on this message or any 
information herein. If you have received this message in error, please advise 
the sender immediately by reply e-mail and delete this message. Thank you for 
your cooperation.

________________________________

Esta mensagem pode conter informação confidencial e/ou privilegiada. Se você 
não for o destinatário ou a pessoa autorizada a receber esta mensagem, não 
deverá utilizar, copiar, alterar, divulgar a informação nela contida ou tomar 
qualquer ação baseada nessas informações. Se você recebeu esta mensagem por 
engano, por favor avise imediatamente o remetente, respondendo o e-mail e em 
seguida apague-o. Agradecemos sua cooperação.

This message may contain confidential and/or privileged information. If you are 
not the addressee or authorized to receive this for the addressee, you must not 
use, copy, disclose, change, take any action based on this message or any 
information herein. If you have received this message in error, please advise 
the sender immediately by reply e-mail and delete this message. Thank you for 
your cooperation.

<<inline: image001.gif>>

<<inline: image002.gif>>

Reply via email to