1
0
Commit Graph

103 Commits

Author SHA1 Message Date
Robert Burrell Donkin
4d51df78d4 Fixed typos in apache licenses
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@138996 13f79535-47bb-0310-9956-ffa450edef68
2003-10-09 21:37:48 +00:00
Robert Burrell Donkin
c81ff3807f Corrected licenses to match jakarta-commons standard.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@138995 13f79535-47bb-0310-9956-ffa450edef68
2003-10-05 15:59:26 +00:00
Craig R. McClanahan
2db31c969e Remove "final" declaration on the Log implementations that still have it
(SimpleLog was already non-final) so that developers can subclass to
specialize the existing behavior.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@138994 13f79535-47bb-0310-9956-ffa450edef68
2003-10-02 16:17:57 +00:00
Craig R. McClanahan
27c9920b42 Correct a usage example in the Package Description javadocs.
PR:  Bugzilla #18889
Submitted By:  Thai Ha (thaiha at psv.com.vn)


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@138993 13f79535-47bb-0310-9956-ffa450edef68
2003-08-16 23:46:31 +00:00
Craig R. McClanahan
a4eb04167c Add support for Lumberjack (a project that supports JSR-47 compatible
logging on a JDK 1.2 or JDK 1.3 system).

PR:  Bugzilla #21455.
Submitted By:  Vince Eagen <vince256 at comcast.net>


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@138992 13f79535-47bb-0310-9956-ffa450edef68
2003-08-16 22:35:16 +00:00
Craig R. McClanahan
e7c2d81417 Make the remaining non-deprecated Log implementations also implement
Serializable, and enhance the unit tests for JDK 1.4 an Log4J logging
to validate the ability to deserialize and use such instances.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@138991 13f79535-47bb-0310-9956-ffa450edef68
2003-08-16 21:58:59 +00:00
Craig R. McClanahan
45c7fb43cb Make o.a.c.l.impl.SimpleLog Serializable.
Add more comprehensive unit tests for SimpleLog, including the ability
to serialize and deserialize instances.

This work will form the basis for making similar changes to the other
Log implementations (and their corresponding test cases).


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@138990 13f79535-47bb-0310-9956-ffa450edef68
2003-08-16 21:25:54 +00:00
Craig R. McClanahan
7e5ed8d7dd Cosmetic changes only - clean up JDK 1.4.2 javadoc generation warnings.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@138989 13f79535-47bb-0310-9956-ffa450edef68
2003-08-16 18:21:50 +00:00
Richard A. Sitze
8ab8f5e09b Cleanup imports.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@138987 13f79535-47bb-0310-9956-ffa450edef68
2003-07-18 14:14:16 +00:00
Craig R. McClanahan
5ac51cd843 Make SimpleLog more friendly to the security manager in an applet
environment, by swallowing any security exceptions when looking
up system properties that are not accessible.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@138985 13f79535-47bb-0310-9956-ffa450edef68
2003-07-15 15:47:38 +00:00
Robert Burrell Donkin
7539845c43 Made implementation of AvalonLogger more robust (avoiding NPEs when nulls are passed in) together with a testcase. Improved build by compiling tests for only those optional components whose dependencies are present. Submitted by Neeme Praks.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@138983 13f79535-47bb-0310-9956-ffa450edef68
2003-05-14 11:14:24 +00:00
Robert Burrell Donkin
3de4f334c8 Added AvalonLogger which wraps the logger used by the Avalon framework. Also added an optional dependency on avalon-framework.jar. Added better warnings to build about which loggers are going to be created. Submitted by Neeme Praks.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@138981 13f79535-47bb-0310-9956-ffa450edef68
2003-05-07 16:23:36 +00:00
Robert Burrell Donkin
11c4638fda Improved documentation.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@138978 13f79535-47bb-0310-9956-ffa450edef68
2003-05-01 16:55:29 +00:00
Robert Burrell Donkin
d8abaeb2b5 Improved error handling. Added custom message when the configured LogFactory implementation does not extend LogFactory. This should make it easier to diagnose when a user has made a mistake in the logging configuration, for example by setting LogFactory to a Log implementation.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@138977 13f79535-47bb-0310-9956-ffa450edef68
2003-05-01 10:32:36 +00:00
Craig R. McClanahan
c2f6f68394 Per discussion on COMMONS-DEV and bug reports 17561 and 17894, deprecate
the "proxy log factory" class o.a.c.l.impl.Log4jFactory (which didn't really
accomplish any functional purpose), and remove from LogFactoryImpl the
creation and use of a proxy instance.

PR:  Bugzilla #17561
Submitted by:  Felix Janssen <thundur at mayaxatl.org>

PR:  Bugzilla #17894
Submitted by:  Nathan Niesen <nathann at objectfx.com>


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@138967 13f79535-47bb-0310-9956-ffa450edef68
2003-04-02 01:53:04 +00:00
Craig R. McClanahan
a6ec91bec0 Remove attempt to configure the root logger if it has not been done so.
* Out of scope for commons-logging, which promises only to wrap
  USE of the logging implementation, not configuration.

* Incorrect assumption that not having appenders configured on the
  root logger is an error.

* Log4J will auto-configure itself if a log4j.xml or log4j.properties
  file is present, so out-of-the-box use with no code is as simple
  as dropping a properties file in the correct place.

PR:  Bugzilla #13201
Submitted by: Steven Caswell <stevencaswell at apache.org>


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@138966 13f79535-47bb-0310-9956-ffa450edef68
2003-04-02 01:29:38 +00:00
Craig R. McClanahan
c12099176f If we are not going to log the message anyway, do not waste the effort
to create a Throwable and figure out the calling class and method stuff.

PR:  Bugzilla #18184
Submitted by:  Bruno Dumon <bruno at outerthought.org>


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@138963 13f79535-47bb-0310-9956-ffa450edef68
2003-03-31 00:27:08 +00:00
Craig R. McClanahan
27559f2f8c Cosmetic changes, and correct copyright dates. Add simple overview
with pointer to the real documentation, and a package.html for the
o.a.c.l.impl package.  Bring various documentation points up to date
with the actual current functionality.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@138961 13f79535-47bb-0310-9956-ffa450edef68
2003-03-30 23:42:36 +00:00
Craig R. McClanahan
64fc246f30 Clean up JavaDoc warning on JDK 1.4.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@138957 13f79535-47bb-0310-9956-ffa450edef68
2003-03-29 18:31:17 +00:00
baliuka
21932779c8 Added tests for class loading, no problems detected in "common" use cases
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@138954 13f79535-47bb-0310-9956-ffa450edef68
2003-03-01 09:55:07 +00:00
Craig R. McClanahan
f7faef2426 Change the class used to detect whether JDK 1.4 is installed from
"java.util.logging.Logger" to "java.sql.Savepoint".  This means
that a JDK 1.3 JVM with an alternative JSR-47 (logging jsr) implementation
available will not be mis-identified as a JDK 1.4 system.

PR:  Bugzilla #16606
Submitted by:  Andreas Wendt <wen at eigner.com>


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@138951 13f79535-47bb-0310-9956-ffa450edef68
2003-02-01 04:11:03 +00:00
Craig R. McClanahan
9f33f5482d Experimentally add a release(ClassLoader) method that lets, for example,
a webapp clean up references to any LogFactory, and associated Log
instances, that are associated with its class loader.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@138948 13f79535-47bb-0310-9956-ffa450edef68
2002-12-18 07:20:50 +00:00
Richard A. Sitze
27b1f756e3 Oops.. almost broke type check via typecast!
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@138947 13f79535-47bb-0310-9956-ffa450edef68
2002-12-13 16:55:39 +00:00
Richard A. Sitze
d256cb00f7 More doPriv's around ClassLoader.loadClass and Class.forName
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@138946 13f79535-47bb-0310-9956-ffa450edef68
2002-12-13 16:48:06 +00:00
Richard A. Sitze
7117827bcb Fix getResourceAsStream security violations with doPriv.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@138945 13f79535-47bb-0310-9956-ffa450edef68
2002-12-12 20:29:16 +00:00
Richard A. Sitze
6daa5b9439 Duh. Different take on this - why do we preload in the first place?
New methods check System & local properties directly.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@138943 13f79535-47bb-0310-9956-ffa450edef68
2002-12-12 19:49:30 +00:00
Richard A. Sitze
b122313d94 1. Wrapped System.getProperties with doPrivileged.
2. Moved catch.  If System properties cannot be loaded,
    then don't abandon effort, but go on to loading
    properties file.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@138942 13f79535-47bb-0310-9956-ffa450edef68
2002-12-12 19:23:34 +00:00
Craig R. McClanahan
4e0ad3c8ff It helps if you actually add the new file as well.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@138941 13f79535-47bb-0310-9956-ffa450edef68
2002-11-23 03:50:13 +00:00
Craig R. McClanahan
2783ad6bc1 Deprecte Log4JCategoryLog (because Log4J has deprecated o.a.l.Category),
and replace it with a new Log4JLogger implementation that wraps an
o.a.l.Logger instance instead.

Update docco to reflect that Log4J support is now for version 1.2 or later
(when o.a.l.Logger was introduced).

PR:  13118
Submitted by:  Paul Campbell <seapwc at halycon.com>


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@138940 13f79535-47bb-0310-9956-ffa450edef68
2002-11-23 03:49:40 +00:00
Craig R. McClanahan
e0be9b7850 Add a getCategory() method that returns the underlying Log4J Category
instance, analogous to the getLogger() method on JDK14Logger.

PR:  Bugzilla 14155
Submitted by:  Chris Hagmann <ch at ipin.com>


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@138939 13f79535-47bb-0310-9956-ffa450edef68
2002-11-23 03:25:33 +00:00
Craig R. McClanahan
03645a6b4a Update remaining documentation that says the default Log implementation
is NoOpLog.  It was changed to SimpleLog a while back.

PR:  Bugzilla #14571
Submitted by:  David M. Karr <dmkarr@earthlink.net>


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@138938 13f79535-47bb-0310-9956-ffa450edef68
2002-11-23 03:07:58 +00:00
Richard A. Sitze
a661c64c6d *** empty log message ***
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@138937 13f79535-47bb-0310-9956-ffa450edef68
2002-11-11 16:52:54 +00:00
Richard A. Sitze
41a175c6bd typo - slap me for not building/testing after EVERY minor change..
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@138928 13f79535-47bb-0310-9956-ffa450edef68
2002-10-19 17:38:06 +00:00
Richard A. Sitze
3a5b034cef - code cleanup, refactoring, and corrected a few undiscoved bugs..
- Bugzilla 13157 - Log4j takes undue precedence over Log override.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@138927 13f79535-47bb-0310-9956-ffa450edef68
2002-10-19 17:25:18 +00:00
Richard A. Sitze
f76f188696 Dump stack trace through logger, not stdout
(preservers sequence of buffered output).


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@138926 13f79535-47bb-0310-9956-ffa450edef68
2002-10-19 17:19:05 +00:00
Richard A. Sitze
03368dd582 Bugzilla Defect 10825 [thanks for the patch & the education!]
Added real text & exceptions to tests.. it's harder to read :-(


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@138923 13f79535-47bb-0310-9956-ffa450edef68
2002-10-17 23:00:04 +00:00
Richard A. Sitze
72e4cef37b javadoc cleanup
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@138917 13f79535-47bb-0310-9956-ffa450edef68
2002-09-27 02:16:44 +00:00
Richard A. Sitze
c53d47efc9 javadoc cleanup
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@138916 13f79535-47bb-0310-9956-ffa450edef68
2002-09-27 02:14:57 +00:00
Richard A. Sitze
5b662d1710 Correct 2 problems:
1. getContextClassLoader is priviledged, protect for J2EE environs.
2. getContextClassLoader can & does return null.  Code wasn't
    checking for this properly.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@138913 13f79535-47bb-0310-9956-ffa450edef68
2002-08-30 03:23:34 +00:00
Richard A. Sitze
5c1867cae3 Correct caching behavior... I broke it a while back, but
I've learned much since then...


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@138907 13f79535-47bb-0310-9956-ffa450edef68
2002-08-12 21:01:07 +00:00
Richard A. Sitze
21e56ae851 Subtle little bug... if we cannot find OUR Log4J wrapper, then
we cannot support Log4j...


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@138904 13f79535-47bb-0310-9956-ffa450edef68
2002-08-09 18:47:34 +00:00
Richard A. Sitze
75d031c682 Compatible change, reveal internal properties that are useful for
discovery...  ?should discovery use reflection to try to find these,
in absence of explicitly provided values?


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@138903 13f79535-47bb-0310-9956-ffa450edef68
2002-08-09 16:18:36 +00:00
Richard A. Sitze
52ba50f028 bug 10480: handle null message without throwing NPE
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@138897 13f79535-47bb-0310-9956-ffa450edef68
2002-07-17 16:42:40 +00:00
Craig R. McClanahan
d3b8b85e48 Make SimpleLog check for its "simplelog.properties" resource in the thread
context class loader, if present, while using the same trick LogFactory
does to protect JDK 1.1 compatibility.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@138895 13f79535-47bb-0310-9956-ffa450edef68
2002-06-15 20:54:48 +00:00
Craig R. McClanahan
08ee4c68c3 Cosmetic changes in comments, to keep the JDK 1.4 standard JavaDoc
doclet from whining.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@138894 13f79535-47bb-0310-9956-ffa450edef68
2002-06-15 18:13:02 +00:00
Richard A. Sitze
6b15ddfe75 Resolve NullPointerExceptions
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@138893 13f79535-47bb-0310-9956-ffa450edef68
2002-06-11 22:47:21 +00:00
Richard A. Sitze
2a26463d60 Correct new method name
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@138892 13f79535-47bb-0310-9956-ffa450edef68
2002-06-11 22:35:33 +00:00
Richard A. Sitze
329f05ee4f Resolve NullPointerExceptions, remove redundant checks, minor refactoring to facilitate readability.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@138891 13f79535-47bb-0310-9956-ffa450edef68
2002-06-11 22:34:32 +00:00
Richard A. Sitze
470f3338d0 Resolve NullPointerExceptions, remove redundant checks, minor refactoring to facilitate readability.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@138890 13f79535-47bb-0310-9956-ffa450edef68
2002-06-11 22:29:14 +00:00
Costin Manolache
b2038dcc68 Make sure we are initialized for all constructors. Change the name of the
default appender.

I still have some problems with log4j's JMX if I construct the logger
via API ( i.e. no log4j.properties ) - but that shouldn't affect too
many people, so I'll leave it.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@138888 13f79535-47bb-0310-9956-ffa450edef68
2002-06-07 00:22:54 +00:00