|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
RE: multi process settingsHi, I have got a problem with the settings of
log4net about multi access on a file. My context : I’v got a dll wich log into a
trace.log. That dll is used by 2 different programs. When the first create the
instance of log4net, the 2nd one can’t write into the trace.log. I can’t find the right settings to do that.
The best behavior would be to create a new file with YYYYMMdd-HH_mm_ss when the
instance can’t write into the file. For now, I did, following the
config-exemple from the apache site :
But I’m having an error with the 2nd
instance wich is : System.TypeLoadException: Could not load type
[log4net.Appender.FileAppender+MinimalLock ]. Tried assembly [log4net,
Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821] and all
loaded assemblies. Is there a solution to that ? Thanks. |
||
|
|
RE: multi process settingsI think you can also instruct the logger to try to acquire
the lock of the file and release it as soon as possible.
Anyway, for multiple process logging, a file is not the
best way. Maiby an event log (windows) or syslog (nix) or a network sink might
work better.
florin From: Jordan JBO. Bouclet [mailto:jbouclet@...] Sent: Friday, October 23, 2009 12:55 PM To: log4net-user@... Subject: RE: multi process settings Hi, I have got a problem with the settings of
log4net about multi access on a file. My context : I’v got a dll wich log into a
trace.log. That dll is used by 2 different programs. When the first create the
instance of log4net, the 2nd one can’t write into the
trace.log. I can’t find the right settings to do that.
The best behavior would be to create a new file with YYYYMMdd-HH_mm_ss when the
instance can’t write into the file. For now, I did, following the config-exemple
from the apache site :
But I’m having an error with the
2nd instance wich is : System.TypeLoadException: Could not load type
[log4net.Appender.FileAppender+MinimalLock ]. Tried assembly [log4net,
Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821] and all
loaded assemblies. Is there a solution to that ? Thanks. |
||
|
|
RE: multi process settingsYep, i did it, it works, but now i’v got an
other problem, i can’t use an appendFile with the rolling on size or by date. Here is what I’ve done :
But for example, <maximumFileSize
value="1MB" /> isn’t usable with a type="log4net.Appender.FileAppender">
L De : Florin Daneliuc
[mailto:florin.daneliuc@...] I think you can also instruct the logger to try to acquire the lock
of the file and release it as soon as possible. Anyway, for multiple process logging, a file is not the best way.
Maiby an event log (windows) or syslog (nix) or a network sink might work
better. florin From: Jordan
JBO. Bouclet [mailto:jbouclet@...] Hi, I have got a problem with the settings of
log4net about multi access on a file. My context : I’v got a dll wich log into a
trace.log. That dll is used by 2 different programs. When the first create the
instance of log4net, the 2nd one can’t write into the trace.log. I can’t find the right settings to do that.
The best behavior would be to create a new file with YYYYMMdd-HH_mm_ss when the
instance can’t write into the file. For now, I did, following the
config-exemple from the apache site :
But I’m having an error with the 2nd
instance wich is : System.TypeLoadException: Could not load type
[log4net.Appender.FileAppender+MinimalLock ]. Tried assembly [log4net,
Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821] and all
loaded assemblies. Is there a solution to that ? Thanks. |
||
|
|
RE: multi process settingsPerhaps database logging would
be better. From: Florin Daneliuc
[mailto:florin.daneliuc@...] I think you can also instruct the logger to try to acquire the lock
of the file and release it as soon as possible. Anyway, for multiple process logging, a file is not the best way.
Maiby an event log (windows) or syslog (nix) or a network sink might work
better. florin From: Jordan JBO. Bouclet
[mailto:jbouclet@...] Hi, I have got a problem with the settings of log4net about
multi access on a file. My context : I’v got a dll wich log into a trace.log. That
dll is used by 2 different programs. When the first create the instance of
log4net, the 2nd one can’t write into the trace.log. I can’t find the right settings to do that. The best
behavior would be to create a new file with YYYYMMdd-HH_mm_ss when the instance
can’t write into the file. For now, I did, following the config-exemple from the apache
site :
But I’m having an error with the 2nd instance
wich is : System.TypeLoadException: Could not load type
[log4net.Appender.FileAppender+MinimalLock ]. Tried assembly [log4net,
Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821] and all
loaded assemblies. Is there a solution to that ? Thanks. |
| Free embeddable forum powered by Nabble | Forum Help |