db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arm...@apache.org
Subject cvs commit: db-ojb/src/java/org/apache/ojb/broker/util/logging CommonsLoggerImpl.java Log4jLoggerImpl.java
Date Wed, 07 Dec 2005 15:21:26 GMT
arminw      2005/12/07 07:21:26

  Modified:    src/java/org/apache/ojb/broker/util/logging
                        CommonsLoggerImpl.java Log4jLoggerImpl.java
  Log:
  merge with 1.0.x branch
  
  Revision  Changes    Path
  1.8       +3 -4      db-ojb/src/java/org/apache/ojb/broker/util/logging/CommonsLoggerImpl.java
  
  Index: CommonsLoggerImpl.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/util/logging/CommonsLoggerImpl.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- CommonsLoggerImpl.java	19 Nov 2005 13:33:55 -0000	1.7
  +++ CommonsLoggerImpl.java	7 Dec 2005 15:21:25 -0000	1.8
  @@ -39,7 +39,6 @@
   	public CommonsLoggerImpl(String aName, LoggingConfiguration conf)
   	{
   	    this.name = aName;
  -        this.log = LogFactory.getLog(aName);
   	}
   
   	/**
  @@ -49,8 +48,8 @@
   	public Log getLog()
   	{
   		/*
  -        Log is declared 'transient', thus we have to null-check
  -		this field because Logger interface extends Serializable
  +        Logger interface extends Serializable, thus Log field is
  +        declared 'transient' and we have to null-check
   		*/
           if(log == null)
           {
  
  
  
  1.21      +5 -7      db-ojb/src/java/org/apache/ojb/broker/util/logging/Log4jLoggerImpl.java
  
  Index: Log4jLoggerImpl.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/util/logging/Log4jLoggerImpl.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- Log4jLoggerImpl.java	19 Nov 2005 13:33:55 -0000	1.20
  +++ Log4jLoggerImpl.java	7 Dec 2005 15:21:26 -0000	1.21
  @@ -97,15 +97,14 @@
           {
               // no configuration available
               LoggerFactory.getBootLogger().warn("No log4j configuration file specified");
  -            log4jConfigured = true;
           }
           else
           {
               // try resource look in classpath
               URL url = ClassHelper.getResource(configFile);
  +            LoggerFactory.getBootLogger().info("Initializing Log4J : resource from config
file:" + configFile);
               if(url != null)
               {
  -                LoggerFactory.getBootLogger().info("Initializing Log4J, resource from config
file: " + url);
                   PropertyConfigurator.configure(url);
               }
               // if file is not in classpath try ordinary filesystem lookup
  @@ -113,8 +112,8 @@
               {
                   PropertyConfigurator.configure(configFile);
               }
  -            log4jConfigured = true;
           }
  +        log4jConfigured = true;
       }
   
       public Log4jLoggerImpl(String name, LoggingConfiguration conf)
  @@ -124,7 +123,6 @@
           {
               initializeLog4JSubSystem(conf.getLoggerConfigFile());
           }
  -        logger = org.apache.log4j.Logger.getLogger(name);
       }
   
       /**
  @@ -135,8 +133,8 @@
       private org.apache.log4j.Logger getLogger()
       {
           /*
  -        Log is declared 'transient', thus we have to null-check
  -		this field because Logger interface extends Serializable
  +        Logger interface extends Serializable, thus Log field is
  +        declared 'transient' and we have to null-check
   		*/
           if(logger == null)
           {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message