db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject cvs commit: db-ojb/src/java/org/apache/ojb/broker/util/logging LoggerFactoryImpl.java
Date Fri, 14 Feb 2003 21:10:27 GMT
thma        2003/02/14 13:10:27

  Modified:    src/java/org/apache/ojb/broker/util/logging
                        LoggerFactoryImpl.java
  Log:
  allow to use user defined loggers
  
  Revision  Changes    Path
  1.9       +12 -3     db-ojb/src/java/org/apache/ojb/broker/util/logging/LoggerFactoryImpl.java
  
  Index: LoggerFactoryImpl.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/util/logging/LoggerFactoryImpl.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- LoggerFactoryImpl.java	24 Dec 2002 13:23:46 -0000	1.8
  +++ LoggerFactoryImpl.java	14 Feb 2003 21:10:27 -0000	1.9
  @@ -1,7 +1,7 @@
   package org.apache.ojb.broker.util.logging;
   
   /* ====================================================================
  - * The Apache Software License, Version 1.1
  + * The Apache Software LicDon'ense, Version 1.1
    *
    * Copyright (c) 2001 The Apache Software Foundation.  All rights
    * reserved.
  @@ -211,7 +211,16 @@
               }
               else
               {
  -                throw new IllegalArgumentException("Don't know how to initialize : "+logger);
  +            	// try to initialize a custom logger
  +                try
  +                {
  +                    getBootLogger().debug("Initializing Custom logger instance "  + loggerName);
  +                    logger.configure(lc);
  +                }
  +                catch (Exception x)
  +                {
  +                    throw new IllegalArgumentException("Don't know how to initialize :
"+logger);
  +                }                
               }
   
               //cache it so we can get it faster the next time
  
  
  

Mime
View raw message