Dominik Psenner commented on LOG4NET-589:

I'm +1 for making the shutdown of the logging framework customizable or 
pluggable in various ways, especially when the logging framework hooks events 
and that hooking cannot be controlled by the application that integrates the 
framework. Changing the shutdown mechanisms will however break existing 
applications if we do not find a backward compatible way to implement this. Do 
you have a good idea how that could be accomplished?

> Impossible to use ProcessExit event for logging needs
> -----------------------------------------------------
>                 Key: LOG4NET-589
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-589
>             Project: Log4net
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Aleksandr Serbin
>            Priority: Minor
>         Attachments: log4net_nonworking.cs, log4net_working.cs
> LoggerManager use ProcessExit event to run shutdown on each 
> repository/loggers. If the user wants to use these events (ProcessExit or 
> DomainUnload) also to log own data, he will meet the problem, since 
> LoggerManager will shutdown all loggers first (log4net_nonworking.cs).
> There is a workaround when you can initialize logger in main method (showed 
> in log4net_working.cs), but then all code loses readability.
>  * It would be great if LoggerManager won't use ProcessExit and DomainUnload 
> to shutdown loggers, since this event might be used in user application for 
> own needs.
>  * If you can not refuse these events, then it would be good to have a public 
> method to reregister those events. User will add own delegates first and then 
> reregister LoggerManager events.

This message was sent by Atlassian JIRA

Reply via email to