krysalis-version/src/java/org/krysalis/version/util/logging LogHandleFactory.java,1.9,1.10

[email protected] Thu, 27 Mar 2003 15:58:05 -0800
Newsgroups gmane.comp.krysalis.sandbox
Message-ID <[email protected]>
Update of /cvsroot/metamorphosis/krysalis-version/src/java/org/krysalis/version/util/logging
In directory sc8-pr-cvs1:/tmp/cvs-serv17720/src/java/org/krysalis/version/util/logging

Modified Files:
	LogHandleFactory.java 
Log Message:
A second plugin.xml (in the root) for testing the plugin locally...

Index: LogHandleFactory.java
===================================================================
RCS file: /cvsroot/metamorphosis/krysalis-version/src/java/org/krysalis/version/util/logging/LogHandleFactory.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** LogHandleFactory.java	27 Mar 2003 23:17:49 -0000	1.9
--- LogHandleFactory.java	27 Mar 2003 23:58:00 -0000	1.10
***************
*** 66,71 ****
  
      public static boolean g_enabled = false;
!     public static boolean g_simple = false;
!     
      private static Object l_context = null;
  
--- 66,70 ----
  
      public static boolean g_enabled = false;
! 
      private static Object l_context = null;
  
***************
*** 86,102 ****
      static {
          boolean enabled = false;
-         boolean simple = false;
  
          try {
              enabled =
!                 (null
                      != System.getProperty(
                          VersionImplementationConstants.VERSION_PACKAGE
                              + ".logging"));
-             simple =
-                 (null
-                     != System.getProperty(
-                         VersionImplementationConstants.VERSION_PACKAGE
-                             + ".logging.simple"));
          }
          catch (SecurityException e) {
--- 85,95 ----
      static {
          boolean enabled = false;
  
          try {
              enabled =
!                 true || (null
                      != System.getProperty(
                          VersionImplementationConstants.VERSION_PACKAGE
                              + ".logging"));
          }
          catch (SecurityException e) {
***************
*** 108,113 ****
          }
  
-         g_simple = simple;
- 
          if (enabled)
              enableLogging();
--- 101,104 ----
***************
*** 122,131 ****
          // If 'simple' try stdout logging before commons..
          l_factory =
!             g_simple
!                 ? (LogHandleFactory) RelativelySafe.loadClassWithFallbacks(
!                     FALLBACK_FACTORY,
!                     ECLIPSE_FACTORY,
!                     COMMONS_FACTORY)
!                 : (LogHandleFactory) RelativelySafe.loadClassWithFallbacks(
                      ECLIPSE_FACTORY,
                      COMMONS_FACTORY,
--- 113,117 ----
          // If 'simple' try stdout logging before commons..
          l_factory =
!             (LogHandleFactory) RelativelySafe.loadClassWithFallbacks(
                      ECLIPSE_FACTORY,
                      COMMONS_FACTORY,
***************
*** 144,150 ****
      }
  
! public static void registerDefaultContext(Object context){
!     l_context = context;
! }
  
      public static LogHandle getLogHandle(String key) {
--- 130,136 ----
      }
  
!     public static void registerDefaultContext(Object context) {
!         l_context = context;
!     }
  
      public static LogHandle getLogHandle(String key) {
***************
*** 163,167 ****
                  System.err.println(
                      "Error configuring log handle. Logging disabled..." + t);
!                 t.printStackTrace(System.err);            
                  g_enabled = false;
              }
--- 149,153 ----
                  System.err.println(
                      "Error configuring log handle. Logging disabled..." + t);
!                 t.printStackTrace(System.err);
                  g_enabled = false;
              }
***************
*** 171,174 ****
--- 157,168 ----
              handle = l_disabledFactory.getSpecializedLogHandle(key, context);
  
+         System.out.println("isEnabled? " + g_enabled);
+ 
+         System.out.println("Log Class " + handle.getClass().getName());
+ 
+         System.out.println("Log " + handle.toString());
+ 
+         System.out.println("isDebugEnabled? " + handle.isDebugEnabled());
+ 
          return handle;
      }
***************
*** 182,186 ****
  
          System.out.println("isEnabled? " + g_enabled);
-         System.out.println("isSimple? " + g_simple);
  
          System.out.println("Log Class " + log.getClass().getName());
--- 176,179 ----




-------------------------------------------------------
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en