Hi Martin (hi all),
I was having a look at the work you've committed so far.
Generally speaking seems exactly what we need. I have some
questions and observations thought (as usual :-p).

I see that in order to redirect a package one has to
go through Logging.getLogging("my.package.name").setLoggerFactory(xxx).
This allows, as far as I can tell, to use a different logging subsystem 
for different packages. Not sure this is needed, but anyways, what's the
way to redirect everything to a specific logger? Would
Logging.getLogging("").setLoggerFactory(xxx) work?

I also noticed that Logging has a getLogger(name) but not a
getLogger(name, bundle). It seems there is nothing in GeoTools using
the latter, yet I'm wondering if that may need to be provided or
not (in fact I've found just one usage of the latter in the entire
java api, in the corba packages).

Log4JLogger.log(Level, Message, Throwable) uses a switch but I think
it could be simplified to logger.log(toLog4jLevel(level), message, 
throwable).

I was also wondering how to implement the user code switch (since I have
to do the same in GeoServer). We have to turn every Logger.getLogger(
into a org.getoools.util.Logging.getLogger(, but taking into account
that Logger.getLogger( may have been split into multiple lines and
with multiple spaces between the relevant parts.
The following regular expression seem to be a good match for our needs:
Logger\s*\.\s*getLogger\s*(

I think I can write a little java app that does process every java file
with the above and perform the switch. Given the java files aren't big,
I can just load them into memory as one big string, do a replaceAll,
and save back. My only concern is about newline and encoding 
preservation... newlines should be kept, I hope there is a way to
guess the original file encoding and force the writer to use the
same. Suggestions?

Cheers
Andrea

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to