e0d9632d8b
Rename testcase files, as batch junit testing only detects classes ending in "TestCase".
Simon Kitching2006-07-20 21:59:50 +00:00
23d8dd0c2c
Only count security exceptions before a message is actually logged, as j.u.logging does (and should) generate security exceptions.
Simon Kitching2006-07-20 21:52:52 +00:00
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.
Simon Kitching2006-07-20 21:08:49 +00:00
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.
Simon Kitching2006-07-20 21:06:09 +00:00
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.
Simon Kitching2006-07-19 23:31:00 +00:00
7d08044587
Add more unit tests for SecurityManager/AccessController issues
Simon Kitching2006-07-19 23:26:49 +00:00
fc6da5291a
Add unit tests to check behaviour when running in applet-like environments with restrictive security managers.
Simon Kitching2006-07-10 10:25:49 +00:00
ea5bc9e2a3
Remove weird unicode char in comments that causes compile warnings
Simon Kitching2006-07-10 06:03:14 +00:00
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.
Simon Kitching2006-05-14 09:31:48 +00:00
86ebf5f6ac
Updated contents. Snippet is generated from a stylesheet. Will commit stylesheet to committers later.
Robert Burrell Donkin2006-05-04 17:46:51 +00:00
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).
Simon Kitching2006-04-19 09:33:50 +00:00
a7349b8120
Fix problem with "suggested" alternative for invalid log adapter class. Always trim whitespace from user-specified log adapter class name.
Simon Kitching2006-04-19 08:57:54 +00:00
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.
Simon Kitching2006-04-17 09:16:28 +00:00
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.
Simon Kitching2006-04-17 03:30:38 +00:00
93cd3bf810
Add comment about getResources not respecting parentFirst
Simon Kitching2006-04-16 21:30:57 +00:00
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.
Simon Kitching2006-04-16 21:30:19 +00:00
21d9e3c157
Fix dumb double-test. Thanks to Dennis Lundberg for pointing this out.
Simon Kitching2006-04-16 21:20:21 +00:00
1c67c2510f
Fix bug where priority of first commons-logging.properties file found was ignored. Also improve diagnostics output.
Simon Kitching2006-04-16 11:36:37 +00:00
3555fbc436
Add unit test to verify that priority of first-found config file is respected
Simon Kitching2006-04-16 11:35:22 +00:00
77abea9d19
Fix error where getResources() would return parent items first, even when parentFirst attribute was set to false.
Simon Kitching2006-04-16 11:27:11 +00:00
393dc1462b
Made logkit tests optional. Moved pathable tests into optional log4j section since they rely on that implementation.
Robert Burrell Donkin2006-04-09 11:27:22 +00:00
a5b7839fec
Added contents section. Improved readability of custom implementation prose. Speiling fixes. Thanks to Simon Kitching for spotting incongruent grammar by I.
Robert Burrell Donkin2006-03-11 10:22:36 +00:00
1b10d09a00
First draft on troubleshooting WAS (and other containers that use custom LogFactory implementations).
Robert Burrell Donkin2006-03-09 20:21:28 +00:00
dfbafcfb30
Improved diagnostics and added more information to the message thrown when a custom LogFactory cannot be loaded due to classloader incompatibilities.
Robert Burrell Donkin2006-03-07 21:54:57 +00:00
d6dfbd01eb
* Fix minor syntax error in previous checkin (oops). * Improve error message when custom LogFactory class cannot be instantiated due to class cast issues.
Simon Kitching2006-03-01 03:11:41 +00:00
497c9ae5f1
Add a diagnostic message, and add some comments related to issues when a LogFactory implementation cannot be instantiated.
Simon Kitching2006-03-01 02:49:34 +00:00
08cd79161b
Trivial javadoc patch to add return type info for isXXXEnabled methods. Thanks to Boris Unckel for patch; see bugzilla#38783.
Simon Kitching2006-02-28 23:57:11 +00:00
eb89dd6405
Diagnostics changes only: * Output correct classloader used to load LogFactory implementation * Use word "from" instead of confusing "->" * Other minor improvements to diagnostics messages.
Simon Kitching2006-02-28 23:32:27 +00:00
dc5a557622
Minor diagnostics tweak: use word "from" instead of confusion "->".
Simon Kitching2006-02-28 23:31:20 +00:00
d1779b026e
Added section on Serializable classes with Log objects as members.
Simon Kitching2006-02-27 09:20:56 +00:00
abfdb4af34
* Make LogKit lib available to unit tests * Fix minor documentation error re running specific tests * Add documentation on enabling diagnostics during tests * replace tabs with spaces
Simon Kitching2006-02-27 02:31:40 +00:00
a6d1f7c256
Removed Serializable marker interface as it is not possible to implement this correctly in all cases. AvalonLogger was introduced in 1.0.4, and was marked Serializable. However serialization for this class was *completely* broken in all cases in that release, so removing the Serializable marker is not considered a binary-incompatible change.
Simon Kitching2006-02-22 04:53:08 +00:00
a79517ab30
After some consideration removed the indexes. JCL isn't signed and so anyone using it in an applet would need to rejar and sign in any case. They can index at the same time. Probably safer this way.
Robert Burrell Donkin2006-02-16 20:29:01 +00:00
bf61edb4c3
Reverted 375631 (null getParent). After discussions about the relevant javadocs, it was established that the interpretation which lead to this patch is probably wrong. The original implementation supplies null to Class.forName which should create the class from the boot loader.
Robert Burrell Donkin2006-02-14 22:38:07 +00:00
d849cc1744
Modify maven build to add two non-standard attributes to the jar's manifest file to indicate the values of "maven.compile.source" and "maven.compile.target". Also modify the build to include an "Implementation-Vendor-Id" of "org.apache" in the jar's manifest.
Niall Kegan Pemberton2006-02-14 01:15:14 +00:00