Logging multiple instance application best practice?

I finally tried log4net for my WPF desktop application.

I'm struggling with the fact that RollingFileAppender has no built in support for multiple instance application.

I don't like an idea of restricting the application to single instance just to make logger happy. Single intstance tricks are all ugly hacks.

Using process ID in the filename of the log file is also not good enough. This has potential of eating up unlimited space, since RollingFileAppender is useless in this situation.

One solution would probably be to send logs to different process, which would take care of serializing the output into files. But this creates new headaches.

What's your take on this?

15
задан Enrico Campidoglio 24 April 2011 в 20:42
поделиться