> Both log files are created right away when I execute:
> I dont want SystemErrorsLog log file to be created, unless I actually log
> FATAL error, log.Fatal("System Error". Otherwise it would be just redundant
> empty log file. Is there any way this can be done, maybe some attribute I am
> not familiar with?
In general FileAppender opens the file immediately once it gets
configured. In fact it is not FileAppender itself but the LockingModel
At least with log4net 1.2.11 the MinimalLock locking model will not open
the file until the first message is logged. It opens and closes the
file for each message. While this might avoid the empty log file it
also implies a performance hit which may be quite significant if you
have many FATAL errors. This may be acceptable if FATAL errors almost
never happen - which I'd hope to be the case.