swebb2066 commented on PR #271:
URL: https://github.com/apache/logging-log4cxx/pull/271#issuecomment-1758962544

   > This looks good to me; if it fixes the "my program crashes because I'm 
logging after calling exit()" problem with no bad side 
   > effects it sounds good to me and could be something that we enable by 
default. Any thoughts?
   
   @vopl could you tell us what your need is?
   
   "logging after calling exit()" will currently produce output if the user 
function is added to the on-exit list after Log4cxx statics (so it is called 
before Log4cxx destructors are called). AFAIK the on-exit list order for 
module-level statics is a determined by the module placement order a link time 
(so it is not easily controlled). No output is produced after the 
APRInitialiser destructor is called. I do not think subsequent logging attempts 
will cause a crash as the Logger objects no longer belong to a LoggerRepository 
and Logger methods take an early exit.
   
   Failing to flush buffers is the one problem with this PR that comes to mind, 
and this is appender/configuration dependent.
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@logging.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to