Simon Kitching
ff8a0111c0
Have DefaultConfigTestCase explicitly set up its classpath. When run from ant, log4j is not on the
...
classpath so using the default setup works; however when run from maven2 surefire, log4j is on the
path. Explicitly controlling the test classpath works in both cases.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@427808 13f79535-47bb-0310-9956-ffa450edef68
2006-08-02 00:08:20 +00:00
Simon Kitching
c340a77d5b
Manually force our custom java.util.logging.Handler class to be loaded via the
...
system classloader. This means that the unit test can successfully run even
when the class is not in the system classpath (as happens when running tests
with maven2's surefire plugin for example).
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@427800 13f79535-47bb-0310-9956-ffa450edef68
2006-08-01 23:48:14 +00:00
Simon Kitching
e0dc5a6f51
Remove unused imports (fix compile warnings).
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@427798 13f79535-47bb-0310-9956-ffa450edef68
2006-08-01 23:46:32 +00:00
Simon Kitching
60e84957f8
When multiple jars on classpath match logical lib name, use jar with shortest name.
...
Also remove debug print statement.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@427797 13f79535-47bb-0310-9956-ffa450edef68
2006-08-01 23:45:58 +00:00
Simon Kitching
7d8b923dc2
Add javadoc only.
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@427477 13f79535-47bb-0310-9956-ffa450edef68
2006-08-01 07:37:00 +00:00
Simon Kitching
be64ad867c
Minor test tidyups (including fixing incorrect comment due to copy-and-paste).
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@427418 13f79535-47bb-0310-9956-ffa450edef68
2006-08-01 03:10:13 +00:00
Simon Kitching
563417f77e
Change test to be compatible with maven2 surefire; when using surefire, junit is not loaded
...
via the system classpath.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@427396 13f79535-47bb-0310-9956-ffa450edef68
2006-08-01 01:16:02 +00:00
Simon Kitching
8b353e9470
Change key of servlet api jar from "servletapi" to "servlet-api". The maven2 tests pull
...
this jar from the maven2 repository, and in there the jarfile has a different name
from the jarfile in the maven1 repo where ant pulls it from :-(.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@427395 13f79535-47bb-0310-9956-ffa450edef68
2006-08-01 01:14:53 +00:00
Simon Kitching
e7ab5b24d8
Allow libs for test to be discovered via the classpath as well as via system properties.
...
This has been implemented to suppprt running tests via the maven surefire plugin, but is
a general-purpose mechanism.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@427394 13f79535-47bb-0310-9956-ffa450edef68
2006-08-01 01:13:11 +00:00
Simon Kitching
557f97f1a5
Make unit tests compatible with maven2 Surefire plugin.
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@425249 13f79535-47bb-0310-9956-ffa450edef68
2006-07-25 01:30:16 +00:00
Simon Kitching
cd2518594b
Add javadoc about setExplicitLoader/addLogicalLib.
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@425247 13f79535-47bb-0310-9956-ffa450edef68
2006-07-25 01:26:37 +00:00
Simon Kitching
f69077181d
Fix for LOGGING-107. JCL failed when run under a security policy that prevented calling ClassLoader.getParent.
...
We now catch SecurityException in this case, and also use an AccessController so JCL can be granted permissions
without needing the caller to have those permissions too.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@424139 13f79535-47bb-0310-9956-ffa450edef68
2006-07-21 00:09:23 +00:00
Simon Kitching
d82ad2ae6e
Update license info using script update-AL20.pl, as per http://www.apache.org/legal/src-headers.html
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@424108 13f79535-47bb-0310-9956-ffa450edef68
2006-07-20 23:19:55 +00:00
Simon Kitching
ceb9dedde4
Update license info using script update-AL20.pl, as per http://www.apache.org/legal/src-headers.html
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@424107 13f79535-47bb-0310-9956-ffa450edef68
2006-07-20 23:15:42 +00:00
Simon Kitching
e0d9632d8b
Rename testcase files, as batch junit testing only detects classes ending in "TestCase".
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@424082 13f79535-47bb-0310-9956-ffa450edef68
2006-07-20 21:59:50 +00:00
Simon Kitching
23d8dd0c2c
Only count security exceptions before a message is actually logged, as j.u.logging
...
does (and should) generate security exceptions.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@424078 13f79535-47bb-0310-9956-ffa450edef68
2006-07-20 21:52:52 +00:00
Simon Kitching
111ea9540b
* Add method getSystemProperty which fetches system properties using an AccessController,
...
so they are accessable by a trusted JCL lib called from untrusted code.
* Add method getContextClassLoaderInternal to fetch context classloader using an
AccessController, as the parent LogFactory class no longer exposes this (restricted)
object for any subclass to access.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@424066 13f79535-47bb-0310-9956-ffa450edef68
2006-07-20 21:08:49 +00:00
Simon Kitching
6bad2dd657
* INCOMPATIBLE CHANGE (minor): protected method getContextClassloader no longer uses an AccessController.
...
This was a (minor) security flaw. Instead, behaviour is reverted to pre-1.1 behaviour where no
AccessController is used, and a new private method getContextClassloaderInternal has been created. The
chance of breaking valid user code is extremely small here. Note that this forces subclass LogFactoryImpl
to provide its own copy of getContextClassloaderInternal, as the parent no longer exposes the (restricted)
context classloader object.
* Get system properties using an AccessController so they are accessable by a trusted JCL lib called
from untrusted code.
* Revert recent patch to run entire static initializer under an AccessController, as the chances of
creating a security flaw are too high. The specific problem this patch was intended to fix has been
addressed by fetching specific system properties via an AccessController.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@424063 13f79535-47bb-0310-9956-ffa450edef68
2006-07-20 21:06:09 +00:00
Simon Kitching
beeeaba151
Fix LOGGING-106 where JCL wouldn't start when run under a SecurityManager that refuses access to system properties.
...
Also use an AccessController so that a signed JCL will work in an unsigned app; note that there appears to be other
places where we are missing AccessControllers too.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@423654 13f79535-47bb-0310-9956-ffa450edef68
2006-07-19 23:31:00 +00:00
Simon Kitching
7d08044587
Add more unit tests for SecurityManager/AccessController issues
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@423653 13f79535-47bb-0310-9956-ffa450edef68
2006-07-19 23:26:49 +00:00
Simon Kitching
fc6da5291a
Add unit tests to check behaviour when running in applet-like environments
...
with restrictive security managers.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@420478 13f79535-47bb-0310-9956-ffa450edef68
2006-07-10 10:25:49 +00:00
Simon Kitching
ea5bc9e2a3
Remove weird unicode char in comments that causes compile warnings
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@420429 13f79535-47bb-0310-9956-ffa450edef68
2006-07-10 06:03:14 +00:00
Simon Kitching
ad4970dbde
Fix a few trivial compiler warnings.
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@406303 13f79535-47bb-0310-9956-ffa450edef68
2006-05-14 10:02:26 +00:00
Simon Kitching
75688e6a39
Remove unused variable.
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@406293 13f79535-47bb-0310-9956-ffa450edef68
2006-05-14 09:35:42 +00:00
Simon Kitching
29935da25a
Fix incorrect package name in unit test. The test was still being compiled and
...
run ok; the generated .class was just ending up in an odd directory.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@406292 13f79535-47bb-0310-9956-ffa450edef68
2006-05-14 09:31:48 +00:00
Robert Burrell Donkin
24ca0f30f3
Updated to next SNAPSHOT
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@406079 13f79535-47bb-0310-9956-ffa450edef68
2006-05-13 11:37:02 +00:00
Robert Burrell Donkin
c9397236b3
Final preparations for JCL 1.1 Release
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@405543 13f79535-47bb-0310-9956-ffa450edef68
2006-05-09 21:45:08 +00:00
Robert Burrell Donkin
62daf181b7
Preparations for Release candidate 11
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@399842 13f79535-47bb-0310-9956-ffa450edef68
2006-05-04 19:51:25 +00:00
Robert Burrell Donkin
35e8d9a94e
Emphasized that DIAGNOSTICS_DEST_PROPERTY is a constant.
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@399431 13f79535-47bb-0310-9956-ffa450edef68
2006-05-03 20:58:34 +00:00
Robert Burrell Donkin
481a7fc7ca
Corrected non-harmful mistake spotted by Dennis Lundberg.
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@399417 13f79535-47bb-0310-9956-ffa450edef68
2006-05-03 20:38:01 +00:00
Dennis Lundberg
04305e4cc5
Add some JavaDocs.
...
Correct JavaDocs.
Replace tab-characters with spaces.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@399225 13f79535-47bb-0310-9956-ffa450edef68
2006-05-03 09:29:00 +00:00
Dennis Lundberg
96854d71f6
Added some JavaDocs.
...
Removed a copy-pasted comment that didn't belong there.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@399224 13f79535-47bb-0310-9956-ffa450edef68
2006-05-03 09:25:54 +00:00
Dennis Lundberg
5f4391761d
Correct JavaDoc links (@see).
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@399221 13f79535-47bb-0310-9956-ffa450edef68
2006-05-03 09:20:24 +00:00
Robert Burrell Donkin
cd2e8b9657
Replaced method introduced in JDK1.4 with clean implementation.
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@396112 13f79535-47bb-0310-9956-ffa450edef68
2006-04-22 11:38:25 +00:00
Robert Burrell Donkin
18e3a6fdad
Preparations for release candidate 10
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@396111 13f79535-47bb-0310-9956-ffa450edef68
2006-04-22 11:26:45 +00:00
Robert Burrell Donkin
60369ce85f
Preparing for release candidate 9.
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@396108 13f79535-47bb-0310-9956-ffa450edef68
2006-04-22 10:50:32 +00:00
Robert Burrell Donkin
f05517ec95
Need to match at least the first 5 characters.
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@395346 13f79535-47bb-0310-9956-ffa450edef68
2006-04-19 18:46:30 +00:00
Simon Kitching
ac4bd0a7cd
The use of static Log objects may or may not be safe depending on how that code is
...
intended to be deployed. It's therefore better for the examples to show the safest
approach (without static fields).
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@395185 13f79535-47bb-0310-9956-ffa450edef68
2006-04-19 09:33:50 +00:00
Simon Kitching
a7349b8120
Fix problem with "suggested" alternative for invalid log adapter class.
...
Always trim whitespace from user-specified log adapter class name.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@395181 13f79535-47bb-0310-9956-ffa450edef68
2006-04-19 08:57:54 +00:00
Simon Kitching
fea8fb4449
* Log the classloader that really loaded the adapter class, rather than the one
...
we called loadClass on.
* Remove some debug code accidentally committed recently.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@394649 13f79535-47bb-0310-9956-ffa450edef68
2006-04-17 09:16:28 +00:00
Simon Kitching
cfb31332a1
* Fix bug where unit tests weren't getting executed at all (wrong test class name)
...
* Put both resources in child classloader rather than using parent, to avoid
confusion with parentFirst not being supported by PathableClassLoader.getResources.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@394603 13f79535-47bb-0310-9956-ffa450edef68
2006-04-17 03:30:38 +00:00
Simon Kitching
93cd3bf810
Add comment about getResources not respecting parentFirst
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@394564 13f79535-47bb-0310-9956-ffa450edef68
2006-04-16 21:30:57 +00:00
Simon Kitching
f32ae813fc
Remove recently-added implementation of getResources. As javadoc already stated,
...
this can't be implemented because in java 1.4 getResources is final :-(. Unit
tests that care about getResources() order will just have to use parentFirst=true.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@394563 13f79535-47bb-0310-9956-ffa450edef68
2006-04-16 21:30:19 +00:00
Simon Kitching
21d9e3c157
Fix dumb double-test. Thanks to Dennis Lundberg for pointing this out.
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@394560 13f79535-47bb-0310-9956-ffa450edef68
2006-04-16 21:20:21 +00:00
Simon Kitching
1f32b55765
Improve diagnostics
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@394467 13f79535-47bb-0310-9956-ffa450edef68
2006-04-16 12:15:30 +00:00
Simon Kitching
ef627680ff
Improve diagnostic output
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@394466 13f79535-47bb-0310-9956-ffa450edef68
2006-04-16 12:11:05 +00:00
Simon Kitching
0ad40253d6
Handle case of null parent classloader
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@394463 13f79535-47bb-0310-9956-ffa450edef68
2006-04-16 12:01:57 +00:00
Simon Kitching
76cc63f74c
Improve diagnostics
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@394462 13f79535-47bb-0310-9956-ffa450edef68
2006-04-16 11:43:29 +00:00
Simon Kitching
1c67c2510f
Fix bug where priority of first commons-logging.properties file found was ignored.
...
Also improve diagnostics output.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@394461 13f79535-47bb-0310-9956-ffa450edef68
2006-04-16 11:36:37 +00:00
Simon Kitching
3555fbc436
Add unit test to verify that priority of first-found config file is respected
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@394460 13f79535-47bb-0310-9956-ffa450edef68
2006-04-16 11:35:22 +00:00