A similar question have been asked and a solution is to use a custom
appender:
http://mail-archives.apache.org/mod_mbox/logging-log4net-user/200907.mbox/%3c003401ca11f2$e51559e0$af400da0$@com%3e

Regards,
Chun Kit


On Wed, Oct 12, 2011 at 9:01 PM, Sigourney_Weaver <slishnev...@gmail.com>wrote:

>
> Hi I am using this configuration that is supposed to create one log file
> for
> business (INFO & ERROR) and another - for system errors (FATAL).
>
> http://old.nabble.com/file/p32638170/Fk2dH.png
>
> Both log files are created right away when I execute:
> LogManager.GetLogger(typeof(Program));
> I dont want SystemErrorsLog log file to be created unles there are FATAL
> (system errors detected), for example, when I execute
> log.Fatal(ex.Message);
> 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?
>
> Thanks a lot.
> --
> View this message in context:
> http://old.nabble.com/How-to-prevent-creating-log-file-----tp32638170p32638170.html
> Sent from the Log4net - Users mailing list archive at Nabble.com.
>
>

Reply via email to