Daniel Marohn wrote:
There shouldnt be one, becourse once created the instance of the
logger will be stored by the repository until aplication ends. I you
use the same loggername you will get the same instance. I guess your
problem is that you do not use the logmanager or repositorie's
GetLogger member but create your instances by yourself (wich will
result in multiple instances of logger with the same name).
Hm.. that makes sense. I am mis-using the logger then, since for
creating the ContextLogger, i create a new one for every instance of the
class, since i'm logging instance specific context information. I see
that is a mis-use of a logger.
I used to have my context logger first as a method on the instance that
was context specific then in a logger class that simply wrapped the
class logger. Both had the issue of mis-reporting the actual place the
log call was called from since I was one level of calls away due to the
abstraction. I'll play with that again, since my ContextLogger really
shouldn't be a LogImpl, but just a helper that adds more info to the log
string.
thanks,
arne