commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oalex...@apache.org
Subject cvs commit: jakarta-commons-sandbox/services/src/java/org/apache/commons/services ServiceManager.java
Date Wed, 19 Dec 2001 16:32:00 GMT
oalexeev    01/12/19 08:32:00

  Modified:    services/src/java/org/apache/commons/services
                        ServiceManager.java
  Log:
  Add internal ServiceManager log.
  
  Revision  Changes    Path
  1.2       +24 -1     jakarta-commons-sandbox/services/src/java/org/apache/commons/services/ServiceManager.java
  
  Index: ServiceManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/services/src/java/org/apache/commons/services/ServiceManager.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ServiceManager.java	2001/12/17 16:38:18	1.1
  +++ ServiceManager.java	2001/12/19 16:32:00	1.2
  @@ -9,20 +9,43 @@
   package org.apache.commons.services;
   
   import java.io.Serializable;
  +import org.apache.commons.logging.Log;
  +import org.apache.commons.logging.LogSource;
   
   /** 
    *  Core class in package.
    * 
  - *  @version $Id: ServiceManager.java,v 1.1 2001/12/17 16:38:18 oalexeev Exp $
  + *  @version $Id: ServiceManager.java,v 1.2 2001/12/19 16:32:00 oalexeev Exp $
    *  @author Oleg V Alexeev
    */
   public class ServiceManager implements Serializable {
   
  +        public static int DEFAULT_LOG_LEVEL = org.apache.commons.logging.Log.OFF;
  +
           protected EventModule eventModule = null;
   
           protected ServiceModule serviceModule = null;
   
           protected QueueModule queueModule = null;
  +
  +        protected LogService logService = null;
  +
  +        protected static Log log = null;
  +
  +        // FIXME - make it more flexible
  +        static {
  +                try {
  +                        LogSource.setLogImplementation( "org.apache.commons.logging.SimpleLog"
);
  +                        log = LogSource.makeNewLogInstance( "org.apache.commons.service.logging.SimpleLog"
);
  +                } catch ( Exception _e ) {
  +                }
  +                log = LogSource.makeNewLogInstance( "org.apache.commons.service.logging.default"
);
  +                log.setLevel( DEFAULT_LOG_LEVEL );
  +        }
  +
  +        public Log getLog() {
  +                return log;
  +        }
   
           public EventModule getEventModule() {
                   return eventModule;
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message