thorhauer    2002/06/12 07:05:50

  Modified:    src/java/org/apache/stratum/scheduler Scheduler.java
               src/test-conf Scheduler.xml
  Log:
  removing System.out and replacing with logging
  
  Revision  Changes    Path
  1.3       +17 -14    
jakarta-turbine-stratum/src/java/org/apache/stratum/scheduler/Scheduler.java
  
  Index: Scheduler.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-stratum/src/java/org/apache/stratum/scheduler/Scheduler.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Scheduler.java    11 Jun 2002 14:02:26 -0000      1.2
  +++ Scheduler.java    12 Jun 2002 14:05:50 -0000      1.3
  @@ -66,6 +66,8 @@
   import org.apache.commons.configuration.PropertiesConfiguration;
   import org.apache.commons.configuration.ConfigurationConverter;
   
  +import org.apache.log4j.Category;
  +
   import org.apache.stratum.lifecycle.Configurable;
   import org.apache.stratum.lifecycle.Startable;
   
  @@ -93,6 +95,12 @@
       implements Configurable, Startable
   {
   
  +    /**
  +     * Log4j category used for logging.
  +     */
  +    private static Category log = Category.getInstance(Scheduler.class);
  +    
  +
       private static String confLocation = 
"/projects/jakarta-turbine-stratum/src/test-conf/Scheduler.properties";
       private StdSchedulerFactory schedulerFactory ;
       protected StdScheduler scheduler;
  @@ -152,7 +160,7 @@
                }
                catch (NullPointerException ex)
                {
  -                System.out.println("Error loading properties to initialize" +
  +                log.error("Error loading properties to initialize" +
                                   " Scheduler Factory. Please make sure the 
following" +
                                   " elements are properly filled out in the" +
                                   " Scheduler .xml config file:\n" +
  @@ -229,24 +237,19 @@
           }
           catch (SchedulerException ex)
           {
  -            System.out.println("Error Initializing Scheduler:  " + 
  -                ex.toString() + 
  -                "\n");
  -            ex.printStackTrace();
  +
  +            log.error("Error Initializing Scheduler:  " + 
  +                ex.toString(),ex);
           }
           catch (ClassNotFoundException ex)
           {
  -            System.out.println("Error Loading Class:  " + 
  -                ex.toString() + 
  -                "\n");
  -            ex.printStackTrace();
  +            log.error("Error Loading class:  " + 
  +                ex.toString(),ex);
           }
           catch (Exception ex)
           {
  -            System.out.println("Error:  " + 
  -                ex.toString() + 
  -                "\n");
  -            ex.printStackTrace();
  +            log.error("Error:  " + 
  +                ex.toString(),ex);
           }   
       }
   
  
  
  
  1.2       +1 -1      jakarta-turbine-stratum/src/test-conf/Scheduler.xml
  
  Index: Scheduler.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-stratum/src/test-conf/Scheduler.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Scheduler.xml     7 Jun 2002 11:36:15 -0000       1.1
  +++ Scheduler.xml     12 Jun 2002 14:05:50 -0000      1.2
  @@ -84,4 +84,4 @@
   
     </triggerConfigs>
   
  -</schedulerConfig>
  \ No newline at end of file
  +</schedulerConfig>
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to