Omaha #5166: Update logging to use SLF4J:binlightning,dat.utils,metartohmdbsrv

Change-Id: Ifa9079463d6105996dbd436eaf73bc9902cadacc

Former-commit-id: bab42b987dfde69126509daceca9b5c6e13de691
This commit is contained in:
Kevin Bisanz 2015-12-11 16:18:29 -06:00
parent 7509fd4f01
commit 967a7eb3ec
7 changed files with 45 additions and 38 deletions

View file

@ -23,8 +23,7 @@ Import-Package: com.raytheon.edex.esb,
com.vividsolutions.jts.geom,
com.vividsolutions.jts.geom.prep,
com.vividsolutions.jts.io,
gov.noaa.nws.ost.edex.plugin.binlightning,
org.apache.commons.logging
gov.noaa.nws.ost.edex.plugin.binlightning
Require-Bundle: com.raytheon.uf.common.dataplugin.binlightning;bundle-version="1.12.1174",
com.raytheon.uf.common.dataplugin;bundle-version="1.12.1174",
com.raytheon.uf.common.datastorage;bundle-version="1.12.1174",

View file

@ -10,7 +10,7 @@ Import-Package: com.raytheon.uf.common.dataplugin.grid,
com.raytheon.uf.common.localization,
com.raytheon.uf.common.monitor.xml,
com.raytheon.uf.common.status,
org.apache.commons.logging
org.slf4j
Export-Package: com.raytheon.uf.edex.dat.utils
Require-Bundle: com.raytheon.edex.common;bundle-version="1.12.2",
com.raytheon.uf.common.monitor;bundle-version="1.12.2",

View file

@ -19,8 +19,8 @@
**/
package com.raytheon.uf.edex.dat.utils;
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.PluginException;
@ -47,6 +47,7 @@ import com.raytheon.uf.edex.database.plugin.PluginFactory;
* 06/22/09 2152 D. Hladky Initial release
* Apr 24, 2014 2060 njensen Updates for removal of grid dataURI column
* 09 Feb 2015 3077 dhladky Updated cache logic
* 11 Dec 2015 5166 kbisanz Update logging to use SLF4J
*
* </pre>
*
@ -56,7 +57,8 @@ import com.raytheon.uf.edex.database.plugin.PluginFactory;
public class DATUtils {
private transient final static Log logger = LogFactory.getLog("DATUtils");
private transient final static Logger logger = LoggerFactory
.getLogger("DATUtils");
/**
* Populate the PDO record
@ -143,7 +145,7 @@ public class DATUtils {
// get the old record for comparison
GridRecord oldRec = cache.getModelData().getGridRecord(
param.getModelName(), param.getParameterName());
if (newRec != null) {
if (newRec.getDataTime().getRefTime()
.after(oldRec.getDataTime().getRefTime())) {
@ -163,29 +165,31 @@ public class DATUtils {
// new record is null, do not overwrite
rec = oldRec;
}
// if you get here this means that no grid exists in cache currently
// if you get here this means that no grid exists in cache
// currently
} else {
// new record is good, insert it
if (newRec != null) {
// fully populate new record
populateGridRecord(newRec);
// insert new record
cache.getModelData().setGridRecord(
param.getModelName(), param.getParameterName(),
newRec);
cache.getModelData().setGridRecord(param.getModelName(),
param.getParameterName(), newRec);
rec = newRec;
// no records for this grid exist at all
// no records for this grid exist at all
} else {
logger.warn("No record(s) found matching these criteria. Model:"
+ param.getModelName()
+ " Param:"
+ param.getParameterName() + " Interval:" + interval);
+ param.getModelName()
+ " Param:"
+ param.getParameterName()
+ " Interval:"
+ interval);
}
}
} catch (Exception e) {
logger.error("Error in grid retrieval: " + param.getModelName() + ": "
+ param.getParameterName() + " record: " + newRec, e);
logger.error("Error in grid retrieval: " + param.getModelName()
+ ": " + param.getParameterName() + " record: " + newRec, e);
}
return rec;

View file

@ -30,11 +30,11 @@ import java.util.List;
import java.util.Map.Entry;
import java.util.TreeSet;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.geotools.coverage.grid.GridGeometry2D;
import org.geotools.geometry.DirectPosition2D;
import org.opengis.referencing.crs.CoordinateReferenceSystem;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.raytheon.uf.common.dataplugin.grid.GridConstants;
import com.raytheon.uf.common.dataplugin.grid.GridRecord;
@ -62,7 +62,8 @@ import com.vividsolutions.jts.geom.Coordinate;
* 19Nov 2011 dhladky Initial creation
* 29 Jan 2013 15729 wkwock fix the algorithm
* Jan 07, 2013 njensen Change some logs to debug
* Apr 24, 2014 2060 njensen Updates for removal of grid dataURI column
* Apr 24, 2014 2060 njensen Updates for removal of grid dataURI column
* Dec 11, 2015 5166 kbisanz Update logging to use SLF4J
*
* </pre>
*
@ -94,7 +95,7 @@ public class FreezingLevel {
// reference time
Calendar refTime = null;
private transient final Log logger = LogFactory.getLog(getClass());
private transient final Logger logger = LoggerFactory.getLogger(getClass());
public FreezingLevel(String modelName) {
this.modelName = modelName;
@ -107,7 +108,8 @@ public class FreezingLevel {
// only for get data for hour 00z,06z,12z, or 18z
int adjustedHour = (refTime.get(Calendar.HOUR_OF_DAY) / 6) * 6;
refTime.set(Calendar.HOUR_OF_DAY, adjustedHour);
TimeUtil.minCalendarFields(refTime, Calendar.MINUTE, Calendar.SECOND, Calendar.MILLISECOND);
TimeUtil.minCalendarFields(refTime, Calendar.MINUTE, Calendar.SECOND,
Calendar.MILLISECOND);
// populates what ever is missing, sets prevalent forecast hour
for (Entry<String, Integer> entry : getGHLevelMap().entrySet()) {

View file

@ -14,4 +14,4 @@ Require-Bundle: com.raytheon.edex.common;bundle-version="1.11.1",
Import-Package: com.raytheon.edex.plugin.obs.metar,
com.raytheon.uf.common.dataplugin.obs.metar,
com.raytheon.uf.common.wmo,
org.apache.commons.logging
org.slf4j

View file

@ -19,8 +19,8 @@
**/
package com.raytheon.uf.edex.metartohmdb;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.raytheon.uf.edex.metartohmdb.dao.HMDBRptDao;
@ -28,22 +28,23 @@ import com.raytheon.uf.edex.metartohmdb.dao.HMDBRptDao;
* Created to extract purge method from MetarToHMDBSrv.
*
* <pre>
*
*
* SOFTWARE HISTORY
*
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Nov 17, 2009 jkorman Initial creation
*
* Dec 11, 2015 5166 kbisanz Update logging to use SLF4J
*
* </pre>
*
*
* @author jkorman
* @version 1.0
* @version 1.0
*/
public class HMDBPurger {
private Log logger = LogFactory.getLog(getClass());
private Logger logger = LoggerFactory.getLogger(getClass());
private HMDBRptDao dao = null;
@ -52,7 +53,7 @@ public class HMDBPurger {
private boolean failSafe = false;
private int purgeHours = 8;
/**
* Construct an instance of this transformer.
*/
@ -77,7 +78,7 @@ public class HMDBPurger {
logger.info("In failsafe mode. No purge performed.");
return;
}
if(dao != null) {
if (dao != null) {
dao.purgeTable(purgeHours);
}
}
@ -90,11 +91,11 @@ public class HMDBPurger {
}
/**
* @param purgeHours the purgeHours to set
* @param purgeHours
* the purgeHours to set
*/
public void setPurgeHours(int purgeHours) {
this.purgeHours = purgeHours;
}
}

View file

@ -19,8 +19,8 @@
**/
package com.raytheon.uf.edex.metartohmdb;
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.uf.common.dataplugin.PluginDataObject;
@ -40,6 +40,7 @@ import com.raytheon.uf.edex.metartohmdb.dao.HMDBRptDao;
* ------------ ---------- ----------- --------------------------
* ???? Initial creation
* May 14, 2014 2536 bclement moved WMO Header to common
* Dec 11, 2015 5166 kbisanz Update logging to use SLF4J
*
* </pre>
*
@ -47,7 +48,7 @@ import com.raytheon.uf.edex.metartohmdb.dao.HMDBRptDao;
*/
public class MetarToHMDBSrv {
private Log logger = LogFactory.getLog(getClass());
private Logger logger = LoggerFactory.getLogger(getClass());
private HMDBRptDao dao = null;