You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by rw...@apache.org on 2005/05/02 21:47:32 UTC
svn commit: r165668 - in /jakarta/commons/proper/discovery/trunk: maven.xml
src/java/org/apache/commons/discovery/log/SimpleLog.java
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