saokar / urlrewritefilter

Automatically exported from code.google.com/p/urlrewritefilter
Other
0 stars 0 forks source link

Late Initiation of debug configuraton #42

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
File : UrlRewriteFilter.java
Currently the debug configuration are set in the init block lines

167.        // set the conf of the logger to make sure we get the messages
in context log
168.        Log.setConfiguration(filterConfig);

Due to this logs from line 152-166 are not logged

Can this config initiation be moved to start of the init block?

Original issue reported on code.google.com by kedar...@gmail.com on 3 Aug 2009 at 3:17

GoogleCodeExporter commented 9 years ago
The possibilities of filterConfig and/or the servletContext (inside the init 
method)
being null might have led to the post validation loading of user configured log
settings. 
Having said that, the Log#setConfiguration(filterConfig) method handles 
scenarios for
the both of the above being null. So the method call can be safely moved to the 
top
of init method call.
PFA a patch for the issue.

Original comment by avl...@gmail.com on 3 Aug 2009 at 4:20

Attachments:

GoogleCodeExporter commented 9 years ago
This is by design.  We can only log effectively if the context is retrieved
correctly.  Log defaults to System.out and info level for the lines before 
checking
that the context is ok.

Original comment by tuc...@gmail.com on 10 Aug 2009 at 11:52