Aleksandr Serbin created LOG4NET-589:
----------------------------------------

             Summary: 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
         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
(v7.6.3#76005)

Reply via email to