commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Libbrecht <p...@activemath.org>
Subject [logging] [patch] making logging applet-friendly
Date Tue, 15 Jul 2003 15:23:48 GMT

Hi there,

To me Jakarta-logging is a saviour in the process of writing sandboxed 
things such as applets or webstart sandboxed applications: we dare use 
log4j for our servers but can turn to the very simple jakarta-logging 
when deploying over the client (log4j is a catastrophe for applets btw).

Everything is fine except... the static initialization of SimpleLog.java 
wich calls a getProperty on a property that is not allowed...

So here's my patch: catch the getProperty()'s possible throws by just 
considering the proprety is not there.

Here's the method, line 161 of SimpleLog.java:

     private static String getStringProperty(String name) {
         String prop = null;
         try {
             prop = System.getProperty(name);
         } catch (Throwable t) {} // ignore...
         return (prop == null) ? simpleLogProps.getProperty(name) : prop;
     }


Should I make a real unidiff patch for that ?

thanks.

Paul


Mime
View raw message