Omaha #5166: Update logging to use SLF4J:sfcobs
Update the following to use SLF4J: com.raytheon.edex.plugin.sfcobs Change-Id: I07993deeef9124592e7457fe9621d1e7cdc9339a Former-commit-id: 9c5ab139702f30142d36264c7b57a7d97ba85d59
This commit is contained in:
parent
1711db0967
commit
a4c55cc55e
11 changed files with 89 additions and 75 deletions
|
@ -24,8 +24,8 @@ import java.util.Calendar;
|
|||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.raytheon.edex.esb.Headers;
|
||||
import com.raytheon.edex.exception.DecoderException;
|
||||
|
@ -73,6 +73,7 @@ import com.raytheon.uf.edex.decodertools.core.DecoderTools;
|
|||
* added status to decode.
|
||||
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
|
||||
* May 14, 2014 2536 bclement moved WMO Header to common, removed TimeTools usage
|
||||
* Dec 17, 2015 5166 kbisanz Update logging to use SLF4J
|
||||
* </pre>
|
||||
*
|
||||
* @author jkorman
|
||||
|
@ -88,7 +89,7 @@ public class SfcObsDecoder extends AbstractDecoder {
|
|||
.getHandler("SfcObs:");
|
||||
|
||||
/** The logger */
|
||||
private final Log logger = LogFactory.getLog(getClass());
|
||||
private final Logger logger = LoggerFactory.getLogger(getClass());
|
||||
|
||||
private boolean removeNILs = true;
|
||||
|
||||
|
|
|
@ -27,8 +27,8 @@ import java.util.HashMap;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.raytheon.uf.common.dataplugin.PluginDataObject;
|
||||
import com.raytheon.uf.common.dataplugin.sfcobs.AncPrecip;
|
||||
|
@ -49,10 +49,11 @@ import com.raytheon.uf.common.serialization.SerializationException;
|
|||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Oct 1, 2009 jkorman Initial creation
|
||||
* Oct 01, 2009 jkorman Initial creation
|
||||
* Feb 15, 2011 5705 cjeanbap Added wmoHeader to HDR_PARAMS_LIST.
|
||||
* Apr 04, 2014 2906 bclement made getDescription() and static constants public
|
||||
* Apr 22, 2014 2906 bclement removed WMO header, timeObs and timeNominal from HDF5 (times still in DB)
|
||||
* Dec 17, 2015 5166 kbisanz Update logging to use SLF4J
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -63,8 +64,8 @@ import com.raytheon.uf.common.serialization.SerializationException;
|
|||
public class SfcObsPointDataTransform {
|
||||
|
||||
/** The logger */
|
||||
private static Log logger = LogFactory
|
||||
.getLog(SfcObsPointDataTransform.class);
|
||||
private static Logger logger = LoggerFactory
|
||||
.getLogger(SfcObsPointDataTransform.class);
|
||||
|
||||
public static final int INT_DEFAULT = -9999;
|
||||
|
||||
|
|
|
@ -25,8 +25,8 @@ import java.util.StringTokenizer;
|
|||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.raytheon.edex.esb.Headers;
|
||||
import com.raytheon.edex.plugin.AbstractRecordSeparator;
|
||||
|
@ -56,6 +56,7 @@ import com.raytheon.uf.edex.decodertools.core.IDecoderConstants;
|
|||
* 20070925 391 jkorman Initial Coding.
|
||||
* May 14, 2014 2536 bclement moved WMO Header to common
|
||||
* Sep 26, 2014 3629 mapeters Added SOM constant, replaced static imports.
|
||||
* Dec 17, 2015 5166 kbisanz Update logging to use SLF4J
|
||||
* </pre>
|
||||
*
|
||||
* @author jkorman
|
||||
|
@ -63,7 +64,7 @@ import com.raytheon.uf.edex.decodertools.core.IDecoderConstants;
|
|||
*/
|
||||
public class SfcObsSeparator extends AbstractRecordSeparator {
|
||||
/** The logger */
|
||||
private Log logger = LogFactory.getLog(getClass());
|
||||
private Logger logger = LoggerFactory.getLogger(getClass());
|
||||
|
||||
private static final String SOM = String
|
||||
.valueOf((char) IDecoderConstants.ASCII_SOM);
|
||||
|
|
|
@ -22,8 +22,8 @@ package com.raytheon.edex.plugin.sfcobs.decoder;
|
|||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.raytheon.edex.plugin.sfcobs.decoder.buoy.DRIBUSynopticDecoder;
|
||||
import com.raytheon.edex.plugin.sfcobs.decoder.metar.METARDecoder;
|
||||
|
@ -47,6 +47,7 @@ import com.raytheon.uf.common.wmo.WMOHeader;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* 20070925 391 jkorman Initial Coding.
|
||||
* Sep 26, 2014 3629 mapeters Added SPACE_CHAR constant.
|
||||
* Dec 17, 2015 5166 kbisanz Update logging to use SLF4J
|
||||
* </pre>
|
||||
*
|
||||
* @author jkorman
|
||||
|
@ -54,7 +55,8 @@ import com.raytheon.uf.common.wmo.WMOHeader;
|
|||
*/
|
||||
public class SfcObsDecoderFactory {
|
||||
/** The logger */
|
||||
private static Log logger = LogFactory.getLog(SfcObsDecoderFactory.class);
|
||||
private static Logger logger = LoggerFactory
|
||||
.getLogger(SfcObsDecoderFactory.class);
|
||||
|
||||
private static final char SPACE_CHAR = ' ';
|
||||
|
||||
|
@ -95,9 +97,9 @@ public class SfcObsDecoderFactory {
|
|||
try {
|
||||
decoder = clazz.newInstance();
|
||||
} catch (InstantiationException e) {
|
||||
logger.error(e);
|
||||
logger.error("Error getting decoder instance", e);
|
||||
} catch (IllegalAccessException e) {
|
||||
logger.error(e);
|
||||
logger.error("Error getting decoder instance", e);
|
||||
}
|
||||
}
|
||||
if (decoder != null) {
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
**/
|
||||
package com.raytheon.edex.plugin.sfcobs.decoder.metar;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.raytheon.edex.exception.DecoderException;
|
||||
import com.raytheon.edex.plugin.sfcobs.decoder.AbstractSfcObsDecoder;
|
||||
|
@ -37,6 +37,7 @@ import com.raytheon.uf.common.dataplugin.PluginDataObject;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 20070928 391 jkorman Initial Coding.
|
||||
* Dec 17, 2015 5166 kbisanz Update logging to use SLF4J
|
||||
* </pre>
|
||||
*
|
||||
* @author jkorman
|
||||
|
@ -45,7 +46,7 @@ import com.raytheon.uf.common.dataplugin.PluginDataObject;
|
|||
public class METARDecoder extends AbstractSfcObsDecoder {
|
||||
|
||||
/** The logger */
|
||||
private Log logger = LogFactory.getLog(getClass());
|
||||
private Logger logger = LoggerFactory.getLogger(getClass());
|
||||
|
||||
/**
|
||||
* Construct the decoder.
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
**/
|
||||
package com.raytheon.edex.plugin.sfcobs.decoder.synoptic;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.raytheon.edex.exception.DecoderException;
|
||||
import com.raytheon.edex.plugin.sfcobs.decoder.AbstractSfcObsDecoder;
|
||||
|
@ -47,6 +47,7 @@ import com.raytheon.uf.edex.pointdata.spatial.ObStationDao;
|
|||
* 20080116 798 jkorman Changed logging levels.
|
||||
* Feb 27, 2013 1638 mschenke Moved ObStationDao to edex pointdata plugin
|
||||
* Sep 30, 2014 3629 mapeters Replaced {@link AbstractSfcObsDecoder#matchElement()} calls.
|
||||
* Dec 17, 2015 5166 kbisanz Update logging to use SLF4J
|
||||
* </pre>
|
||||
*
|
||||
* @author jkorman
|
||||
|
@ -55,7 +56,7 @@ import com.raytheon.uf.edex.pointdata.spatial.ObStationDao;
|
|||
public class CMANSynopticDecoder extends LandSynopticDecoder {
|
||||
|
||||
/** The logger */
|
||||
private Log logger = LogFactory.getLog(getClass());
|
||||
private Logger logger = LoggerFactory.getLogger(getClass());
|
||||
|
||||
/**
|
||||
* Construct an instance of a Coastal Marine observation decoder.
|
||||
|
@ -135,8 +136,8 @@ public class CMANSynopticDecoder extends LandSynopticDecoder {
|
|||
staId);
|
||||
stationInfo = obSta.queryByGid(gid);
|
||||
if (stationInfo != null) {
|
||||
logger.debug("Processing CMAN[" + getReportIdentifier()
|
||||
+ "]");
|
||||
logger.debug("Processing CMAN["
|
||||
+ getReportIdentifier() + "]");
|
||||
setWmoRegion(stationInfo.getWmoRegion());
|
||||
} else {
|
||||
logger.info("Station id not found ["
|
||||
|
|
|
@ -22,8 +22,8 @@ package com.raytheon.edex.plugin.sfcobs.decoder.synoptic;
|
|||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.raytheon.edex.exception.DecoderException;
|
||||
import com.raytheon.edex.plugin.sfcobs.decoder.AbstractSfcObsDecoder;
|
||||
|
@ -54,6 +54,7 @@ import com.raytheon.uf.edex.pointdata.spatial.ObStationDao;
|
|||
* 20080116 798 jkorman Changed logging levels.
|
||||
* Feb 27, 2013 1638 mschenke Moved ObStationDao to edex pointdata plugin
|
||||
* Sep 30, 2014 3629 mapeters Replaced {@link AbstractSfcObsDecoder#matchElement()} calls.
|
||||
* Dec 17, 2015 5166 kbisanz Update logging to use SLF4J
|
||||
* </pre>
|
||||
*
|
||||
* @author jkorman
|
||||
|
@ -62,7 +63,7 @@ import com.raytheon.uf.edex.pointdata.spatial.ObStationDao;
|
|||
public class LandSynopticDecoder extends AbstractSynopticDecoder {
|
||||
|
||||
// The logger
|
||||
private Log logger = LogFactory.getLog(getClass());
|
||||
private Logger logger = LoggerFactory.getLogger(getClass());
|
||||
|
||||
protected ObStation stationInfo = null;
|
||||
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
**/
|
||||
package com.raytheon.edex.plugin.sfcobs.decoder.synoptic;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.raytheon.edex.exception.DecoderException;
|
||||
import com.raytheon.edex.plugin.sfcobs.decoder.AbstractSfcObsDecoder;
|
||||
|
@ -40,6 +40,7 @@ import com.raytheon.uf.common.dataplugin.sfcobs.ObsCommon;
|
|||
* 20071010 391 jkorman Initial coding.
|
||||
* 20071217 453 jkorman Added code to report MAROB report type.
|
||||
* Sep 30, 2014 3629 mapeters Replaced {@link AbstractSfcObsDecoder#matchElement()} calls.
|
||||
* Dec 17, 2015 5166 kbisanz Update logging to use SLF4J
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -50,7 +51,7 @@ import com.raytheon.uf.common.dataplugin.sfcobs.ObsCommon;
|
|||
public class MAROBSynopticDecoder extends SHIPSynopticDecoder {
|
||||
|
||||
// The logger
|
||||
private Log logger = LogFactory.getLog(getClass());
|
||||
private Logger logger = LoggerFactory.getLogger(getClass());
|
||||
|
||||
/**
|
||||
* Create and set up the MAROB synoptic decoder.
|
||||
|
|
|
@ -21,8 +21,8 @@ package com.raytheon.edex.plugin.sfcobs.decoder.synoptic;
|
|||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.raytheon.edex.exception.DecoderException;
|
||||
import com.raytheon.edex.plugin.sfcobs.decoder.AbstractSfcObsDecoder;
|
||||
|
@ -45,6 +45,7 @@ import com.raytheon.uf.edex.decodertools.core.IDecoderConstants;
|
|||
* Jul 23, 2014 3410 bclement location changed to floats
|
||||
* Sep 30, 2014 3629 mapeters Replaced {@link AbstractSfcObsDecoder#matchElement()}
|
||||
* calls, added ELEV_PATTERN.
|
||||
* Dec 17, 2015 5166 kbisanz Update logging to use SLF4J
|
||||
* </pre>
|
||||
*
|
||||
* @author jkorman
|
||||
|
@ -56,7 +57,7 @@ public class MobileSynopticDecoder extends AbstractSynopticDecoder {
|
|||
.compile("[/0-9]{4}[1-8]");
|
||||
|
||||
// The logger
|
||||
private Log logger = LogFactory.getLog(getClass());
|
||||
private Logger logger = LoggerFactory.getLogger(getClass());
|
||||
|
||||
private Float mobileLatitude = null;
|
||||
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
**/
|
||||
package com.raytheon.edex.plugin.sfcobs.decoder.synoptic;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.raytheon.edex.exception.DecoderException;
|
||||
import com.raytheon.edex.plugin.sfcobs.decoder.AbstractSfcObsDecoder;
|
||||
|
@ -51,6 +51,7 @@ import com.raytheon.uf.edex.pointdata.spatial.ObStationDao;
|
|||
* Feb 27, 2013 1638 mschenke Moved ObStationDao to edex pointdata plugin
|
||||
* Jul 23, 2014 3410 bclement location changed to floats
|
||||
* Sep 30, 2014 3629 mapeters Replaced {@link AbstractSfcObsDecoder#matchElement()} calls.
|
||||
* Dec 17, 2015 5166 kbisanz Update logging to use SLF4J
|
||||
* </pre>
|
||||
*
|
||||
* @author jkorman
|
||||
|
@ -59,7 +60,7 @@ import com.raytheon.uf.edex.pointdata.spatial.ObStationDao;
|
|||
public class SHIPSynopticDecoder extends AbstractSynopticDecoder {
|
||||
|
||||
// The logger
|
||||
private Log logger = LogFactory.getLog(getClass());
|
||||
private Logger logger = LoggerFactory.getLogger(getClass());
|
||||
|
||||
protected Float shipLatitude = null;
|
||||
|
||||
|
@ -119,8 +120,10 @@ public class SHIPSynopticDecoder extends AbstractSynopticDecoder {
|
|||
}
|
||||
if (staInfo != null) {
|
||||
isFixedBuoy = true;
|
||||
buoyLat = DecoderTools.getCoordinateLatitude(staInfo.getStationGeom().getCoordinate());
|
||||
buoyLon = DecoderTools.getCoordinateLongitude(staInfo.getStationGeom().getCoordinate());
|
||||
buoyLat = DecoderTools.getCoordinateLatitude(staInfo
|
||||
.getStationGeom().getCoordinate());
|
||||
buoyLon = DecoderTools.getCoordinateLongitude(staInfo
|
||||
.getStationGeom().getCoordinate());
|
||||
buoyElev = staInfo.getElevation();
|
||||
}
|
||||
}
|
||||
|
@ -164,7 +167,6 @@ public class SHIPSynopticDecoder extends AbstractSynopticDecoder {
|
|||
// encoded location. This is so that moored buoy locations agree
|
||||
// with the spi files
|
||||
|
||||
|
||||
shipLatitude = buoyLat != null ? buoyLat.floatValue() : null;
|
||||
shipLongitude = buoyLon != null ? buoyLon.floatValue() : null;
|
||||
shipElev = buoyElev;
|
||||
|
@ -176,7 +178,8 @@ public class SHIPSynopticDecoder extends AbstractSynopticDecoder {
|
|||
} else {
|
||||
if ((shipLatitude == null) || (shipLongitude == null)) {
|
||||
clearSectionDecoders();
|
||||
logger.error("BAD:YYGGI_SUB_W : " + reportParser.getReport());
|
||||
logger.error("BAD:YYGGI_SUB_W : "
|
||||
+ reportParser.getReport());
|
||||
return;
|
||||
}
|
||||
adjustLatLon();
|
||||
|
|
|
@ -24,8 +24,8 @@ import java.util.regex.Pattern;
|
|||
import javax.measure.converter.UnitConverter;
|
||||
import javax.measure.unit.SI;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.raytheon.edex.exception.DecoderException;
|
||||
import com.raytheon.edex.plugin.sfcobs.decoder.AbstractSfcObsDecoder;
|
||||
|
@ -56,11 +56,12 @@ import com.raytheon.uf.edex.decodertools.core.IDecoderConstants;
|
|||
* 20071010 391 jkorman Initial coding.
|
||||
* 20071203 410 jkorman JavaDoc complaints.
|
||||
* 20080116 798 jkorman Changed logging levels.
|
||||
* Sep 18, 2014 #3627 mapeters Convert units using {@link UnitConverter}, removed
|
||||
* Sep 18, 2014 3627 mapeters Convert units using {@link UnitConverter}, removed
|
||||
* unused duration field, made patterns constant.
|
||||
* Sep 26, 2014 #3629 mapeters Replaced static imports.
|
||||
* Sep 30, 2014 #3629 mapeters Conformed to changes in ISynoptic constants.
|
||||
* May 26, 2015 #4525 mapeters Fix pressure unit conversion.
|
||||
* Sep 26, 2014 3629 mapeters Replaced static imports.
|
||||
* Sep 30, 2014 3629 mapeters Conformed to changes in ISynoptic constants.
|
||||
* May 26, 2015 4525 mapeters Fix pressure unit conversion.
|
||||
* Dec 17, 2015 5166 kbisanz Update logging to use SLF4J
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -80,7 +81,7 @@ public class SynopticSec3Decoder extends AbstractSectionDecoder {
|
|||
private static final Pattern P912 = Pattern.compile("912\\d{2}");
|
||||
|
||||
/** The logger */
|
||||
private Log logger = LogFactory.getLog(getClass());
|
||||
private Logger logger = LoggerFactory.getLogger(getClass());
|
||||
|
||||
private DataItem maxTemperature = null; // (group 1xxxx)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue