commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rwins...@apache.org
Subject svn commit: r165668 - in /jakarta/commons/proper/discovery/trunk: maven.xml src/java/org/apache/commons/discovery/log/SimpleLog.java
Date Mon, 02 May 2005 19:47:32 GMT
Author: rwinston
Date: Mon May  2 12:47:31 2005
New Revision: 165668

URL: http://svn.apache.org/viewcvs?rev=165668&view=rev
Log:
Ignore SecurityExceptions (PR 29643)

Modified:
    jakarta/commons/proper/discovery/trunk/maven.xml
    jakarta/commons/proper/discovery/trunk/src/java/org/apache/commons/discovery/log/SimpleLog.java

Modified: jakarta/commons/proper/discovery/trunk/maven.xml
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/discovery/trunk/maven.xml?rev=165668&r1=165667&r2=165668&view=diff
==============================================================================
--- jakarta/commons/proper/discovery/trunk/maven.xml (original)
+++ jakarta/commons/proper/discovery/trunk/maven.xml Mon May  2 12:47:31 2005
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 <!--
-   Copyright 2003-2004 The Apache Software Foundation
+   Copyright 2003-2005 The Apache Software Foundation
 
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.

Modified: jakarta/commons/proper/discovery/trunk/src/java/org/apache/commons/discovery/log/SimpleLog.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/discovery/trunk/src/java/org/apache/commons/discovery/log/SimpleLog.java?rev=165668&r1=165667&r2=165668&view=diff
==============================================================================
--- jakarta/commons/proper/discovery/trunk/src/java/org/apache/commons/discovery/log/SimpleLog.java
(original)
+++ jakarta/commons/proper/discovery/trunk/src/java/org/apache/commons/discovery/log/SimpleLog.java
Mon May  2 12:47:31 2005
@@ -104,6 +104,7 @@
             dateFormatter = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss:SSS zzz");
         }
 
+        try {
         // set log level from properties
         String lvl = System.getProperty(PROP_LEVEL);
 
@@ -124,6 +125,13 @@
         } else if("off".equalsIgnoreCase(lvl)) {
             setLevel(SimpleLog.LOG_LEVEL_OFF);
         }
+      } catch (SecurityException ignored) {
+      //do nothing. We get here if running discovery
+      //under a servlet with restricted security rights, and
+      //cannot read the system property.
+     //In which case, the default is what you get to keep.	
+      }
+
     }
 
     // -------------------------------------------------------- Properties



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message