Changeset 2328


Ignore:
Timestamp:
Apr 8, 2014, 9:54:27 AM (9 years ago)
Author:
olle
Message:

Refs #529. Lab environment extension updated to increase similarity of logging with that used by BASE. Package org.apache.log4j.Logger exchanged for org.slf4j.Logger and org.slf4j.LoggerFactory. Logger object properties changed from protected static to private static final. Affected files:

  1. JAR file log4j-1.2.16.jar removed from lib/compile/.
  2. Class/file LabEnvironment.java in src/net/sf/basedb/labenv/ updated.
  3. Class/file LabEnvironmentConfiguration.java in src/net/sf/basedb/labenv/ updated.
  4. Class/file LabEnvService.java in src/net/sf/basedb/labenv/service/ updated.
  5. Class/file LabEnvironmentServlet.java in src/net/sf/basedb/labenv/servlet/ updated.
  6. Class/file LabEnvironmentStatisticsServlet.java in src/net/sf/basedb/labenv/servlet/ updated.
  7. Class/file LabEnvironmentStorageUtil.java in src/net/sf/basedb/labenv/util/ updated.
  8. Class/file LabSensorUtil.java in src/net/sf/basedb/labenv/util/ updated.


Location:
extensions/net.sf.basedb.labenv/trunk
Files:
1 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.labenv/trunk/src/net/sf/basedb/labenv/LabEnvironment.java

    r2326 r2328  
    66import java.util.List;
    77
    8 import org.apache.log4j.Logger;
     8import org.slf4j.Logger;
     9import org.slf4j.LoggerFactory;
    910
    1011import net.sf.basedb.labenv.dao.LabEnvironmentData;
     
    2021  private static LabEnvironment instance = null;
    2122 
    22   protected static Logger log = Logger.getLogger(LabEnvironment.class);
     23  private static final Logger log = LoggerFactory.getLogger(LabEnvironment.class);
    2324 
    2425  // Instance variables connected to measurement cycle per stored value
  • extensions/net.sf.basedb.labenv/trunk/src/net/sf/basedb/labenv/LabEnvironmentConfiguration.java

    r2326 r2328  
    4343import org.jdom.output.Format;
    4444import org.jdom.output.XMLOutputter;
    45 import org.apache.log4j.Logger;
     45import org.slf4j.Logger;
     46import org.slf4j.LoggerFactory;
    4647
    4748import net.sf.basedb.labenv.converter.StringToDateConverter;
     
    5859public class LabEnvironmentConfiguration
    5960{
    60   protected static Logger log = Logger.getLogger(LabEnvironmentConfiguration.class);
     61  private static final Logger log = LoggerFactory.getLogger(LabEnvironmentConfiguration.class);
    6162  /**
    6263    Default converter for string values to date+time values: yyyyMMdd HHmm
  • extensions/net.sf.basedb.labenv/trunk/src/net/sf/basedb/labenv/service/LabEnvService.java

    r2326 r2328  
    2525import java.util.TimerTask;
    2626
    27 import org.apache.log4j.Logger;
     27import org.slf4j.Logger;
     28import org.slf4j.LoggerFactory;
    2829
    2930import net.sf.basedb.clients.web.extensions.service.ServiceControllerAction;
     
    5051  implements ServiceControllerAction, ActionFactory<ServiceControllerAction>
    5152{
    52   protected static Logger log = Logger.getLogger(LabEnvService.class);
     53  private static final Logger log = LoggerFactory.getLogger(LabEnvService.class);
    5354
    5455  private boolean running;
  • extensions/net.sf.basedb.labenv/trunk/src/net/sf/basedb/labenv/servlet/LabEnvironmentServlet.java

    r2326 r2328  
    7070import org.apache.commons.httpclient.HttpStatus;
    7171import org.apache.commons.httpclient.methods.GetMethod;
    72 import org.apache.log4j.Logger;
     72import org.slf4j.Logger;
     73import org.slf4j.LoggerFactory;
    7374
    7475public class LabEnvironmentServlet
    7576  extends HttpServlet
    7677{
    77   protected static Logger log = Logger.getLogger(LabEnvironmentServlet.class);
     78  private static final Logger log = LoggerFactory.getLogger(LabEnvironmentServlet.class);
    7879  /**
    7980    Default converter for string values to date+time values: yyyyMMdd HHmm
  • extensions/net.sf.basedb.labenv/trunk/src/net/sf/basedb/labenv/servlet/LabEnvironmentStatisticsServlet.java

    r2326 r2328  
    3131import org.json.simple.JSONArray;
    3232import org.json.simple.JSONObject;
    33 import org.apache.log4j.Logger;
     33import org.slf4j.Logger;
     34import org.slf4j.LoggerFactory;
    3435
    3536public class LabEnvironmentStatisticsServlet
    3637  extends HttpServlet
    3738{
    38   protected static Logger log = Logger.getLogger(LabEnvironmentStatisticsServlet.class);
     39  private static final Logger log = LoggerFactory.getLogger(LabEnvironmentStatisticsServlet.class);
    3940  public static final String weekdayFilterAll = "all";
    4041  public static final String weekdayFilterMondayToFriday = "mondaytofriday";
  • extensions/net.sf.basedb.labenv/trunk/src/net/sf/basedb/labenv/util/LabEnvironmentStorageUtil.java

    r2326 r2328  
    3535import java.util.List;
    3636
    37 import org.apache.log4j.Logger;
     37import org.slf4j.Logger;
     38import org.slf4j.LoggerFactory;
    3839
    3940//import net.sf.basedb.labenv.LabSensor;
     
    4849public class LabEnvironmentStorageUtil
    4950{
    50   protected static Logger log = Logger.getLogger(LabEnvironmentStorageUtil.class);
     51  private static final Logger log = LoggerFactory.getLogger(LabEnvironmentStorageUtil.class);
    5152  private String dbFileName = "roomtempandhumidity.db";
    5253    private String sUrlProtocol = "jdbc:sqlite:";
  • extensions/net.sf.basedb.labenv/trunk/src/net/sf/basedb/labenv/util/LabSensorUtil.java

    r2303 r2328  
    4444import org.apache.commons.httpclient.HttpStatus;
    4545import org.apache.commons.httpclient.methods.GetMethod;
    46 import org.apache.log4j.Logger;
     46import org.slf4j.Logger;
     47import org.slf4j.LoggerFactory;
    4748
    4849public class LabSensorUtil
    4950{
    50   protected static Logger log = Logger.getLogger(LabSensorUtil.class);
     51  private static final Logger log = LoggerFactory.getLogger(LabSensorUtil.class);
    5152  private int timeoutInSeconds = 5;
    5253
Note: See TracChangeset for help on using the changeset viewer.