JDK loghandler is broken
------------------------

                 Key: AMDATU-445
                 URL: http://jira.amdatu.org/jira/browse/AMDATU-445
             Project: Amdatu
          Issue Type: Bug
          Components: Amdatu Core
            Reporter: Marcel Offermans


While working on AMDATU-433 I discovered that the JDK loghandler is broken.

The JDK logging API allows you to add named loggers at any time. The standard 
design pattern is to create the logger when the class it belongs to is loaded 
(which can be at any point in time). Also, programmatically, you can make 
changed to the logging configuration, again at arbitrary points in time (adding 
handlers for example).

Currently our strategy seems to be to look at the existing loggers whenever a 
new service is registered, which is rather arbitrary, and tries to modify them 
so they redirect to only "our" handler. This only works a bit as any changes 
that happen after the last service registration are not intercepted.

Also, all loggers are now "reset" at every pass, removing all handlers and then 
adding our own without even checking if there were others, which might cause 
quite a bit of overhead.

To be honest, I don't think the JDK logging API gives us the right hooks to 
react in a more event based way, but then again I'm no expert on the matter. 
Anyway, either there is a way to fundamentally redirect all logging, and we 
should implement that, or we should not bother at all because we simply cannot 
do the right thing.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
http://jira.amdatu.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
Amdatu-developers mailing list
[email protected]
http://lists.amdatu.org/mailman/listinfo/amdatu-developers

Reply via email to