commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From commons-...@jakarta.apache.org
Subject [Jakarta Commons Wiki] Updated: Logging/FrequentlyAskedQuestions
Date Tue, 15 Feb 2005 08:48:06 GMT
   Date: 2005-02-15T00:48:06
   Editor: SimonKitching
   Wiki: Jakarta Commons Wiki
   Page: Logging/FrequentlyAskedQuestions
   URL: http://wiki.apache.org/jakarta-commons/Logging/FrequentlyAskedQuestions

   no comment

Change Log:

------------------------------------------------------------------------------
@@ -33,6 +33,30 @@
 
 For more information see http://mail-archives.apache.org/eyebrowse/ReadMsg?listName=commons-user@jakarta.apache.org&msgNo=5737
 
+
+== How can I close loggers when using Commons-Logging? ==
+
+You can't. 
+
+Commons-logging is a wrapper intended to isolate code from the underlying logging library
when log calls are being made.
+In particular, it is intended to allow library code to contain logging calls without caring
about what concrete log implementation
+is being used by the wider application the library is deployed within.
+
+It is not intended to isolate applications from the logging-specific details of initialization
and termination.
+
+The fact that some logging implementations auto-configure themselves when first used doesn't
mean that commons-logging guarantees to
+do this in all cases, nor that the default initialization behaviour of the concrete logging
libraries is appropriate under all circumstances.
+
+And the fact that some logging libraries (or subsets thereof) terminate nicely without requiring
library-specific shutdown code doesn't mean that
+all libraries will work correctly in this manner, nor that commons-logging will isolate code
from this task.
+
+In short: when necessary, obtain a reference to the actual underlying log implementation
and use library-specific calls to initialise
+and terminate as required. 
+
+If you need a reference to the underlying object for a particular commons-logging Log object
in order to perform initialisation or
+termination, then in most cases the org.apache.commons.logging.Log class can be downcast
to a concrete type that then has a
+"getLogger" method that returns the real underlying object.
+
 ----
 
 

---------------------------------------------------------------------
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