[Bug 96] New: Make ContextSelectors truely pluggable/configurable

http://bugzilla.qos.ch/show_bug.cgi?id=96 Summary: Make ContextSelectors truely pluggable/configurable Product: logback-classic Version: unspecified Platform: PC OS/Version: Windows Status: NEW Severity: major Priority: P1 Component: Other AssignedTo: logback-dev@qos.ch ReportedBy: lars@koedderitzsch.net Currently the ContextSelectors in Logback are limited to Default and JNDI, whereas a system property leads to ContextJNDISelector being pulled. This stuff is all hardcoded therefore not configurable. I cannot use ContextJNDISelector because of a bug(?) in Websphere 6.1. In WS 6.1. env-entry values are seemingly bound to the JNDI at a very late point. This leads to that the JNDI lookups fail because Logback initializes (through jlc-over-sl4j) way earlier in the application startup phase. It boils down to that I cannot use ContextJNDISelector in WS 6.1. For this reason I wanted to provide a custom ContextSelector to Logback, which is currently not possible. -- Configure bugmail: http://bugzilla.qos.ch/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.

http://bugzilla.qos.ch/show_bug.cgi?id=96 noreply.ceki@qos.ch changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED ------- Comment #1 from noreply.ceki@qos.ch 2007-09-18 22:48 ------- Lars, Thank you for this report. I made the requested changes but have not had the change to test. See revision 1593: http://svn.qos.ch/viewvc?view=rev&revision=1593 Could you please check of it works for you? By the way, ContextJNDISelector will not work in presence of a cache as is the case when using jcl-over-slf4j. -- Configure bugmail: http://bugzilla.qos.ch/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.

http://bugzilla.qos.ch/show_bug.cgi?id=96 ------- Comment #2 from lars@koedderitzsch.net 2007-09-18 23:12 ------- The change looks good, thanks for you very quick response on this. I'll try the change in the next week (we launch our product later this week). Is there a place where I can grab the latest nightly, or do I need to build from the repository? As I understand it from the code I need to provide the fully qualified classname of my custom ContextSelector through the "logback.ContextSelector" system property. Further - besides implementing the ContextSelector interface - the custom ContextSelector class need an constructor that takes a LoggerContext argument. In this point I think it would be more clear to ContextSelector implementors, if the initialization done through the constructor could be pulled into the ContextSelector interface, e.g. public void initialize(LoggerContext defaultContext); Otherwise I see people implementing ContextSelector and try to use it and fail because their implementation does not include the expected constructor in the first try. Exposing the initialization needs through the ContextSelector interface would help in this point. -- Configure bugmail: http://bugzilla.qos.ch/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
participants (1)
-
bugzilla-daemon@pixie.qos.ch