Omaha #5166: Update logging to use SLF4J:goessounding,poessounding

Change-Id: I9823171ffc2fa2807ad6c18198c9f6dd082e9c86

Former-commit-id: b475166fb952e9850ff0df6a9b52c30c206466c9
This commit is contained in:
Kevin Bisanz 2015-12-15 16:12:13 -06:00
parent 31b3ba9bd4
commit 907df44c71
8 changed files with 85 additions and 79 deletions

View file

@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Goessounding Plug-in
Bundle-SymbolicName: com.raytheon.edex.plugin.goessounding
Bundle-Version: 1.14.0.qualifier
Bundle-Version: 1.15.0.qualifier
Bundle-Vendor: RAYTHEON
Require-Bundle: com.raytheon.edex.common,
com.raytheon.uf.edex.decodertools;bundle-version="1.0.0",
@ -23,4 +23,4 @@ Import-Package: com.raytheon.uf.common.dataplugin.goessounding,
com.raytheon.uf.edex.bufrtools.descriptors,
com.raytheon.uf.edex.bufrtools.packets,
com.raytheon.uf.edex.pointdata,
org.apache.commons.logging
org.slf4j

View file

@ -19,8 +19,8 @@
**/
package com.raytheon.edex.plugin.goessounding;
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;
@ -33,7 +33,8 @@ import com.raytheon.edex.esb.Headers;
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Oct 6, 2009 jkorman Initial creation
* Oct 06, 2009 jkorman Initial creation
* Dec 15, 2015 5166 kbisanz Update logging to use SLF4J
*
* </pre>
*
@ -43,8 +44,8 @@ import com.raytheon.edex.esb.Headers;
public class GOESSndgSeparatorFactory {
private static Log logger = LogFactory
.getLog(GOESSndgSeparatorFactory.class);
private static Logger logger = LoggerFactory
.getLogger(GOESSndgSeparatorFactory.class);
/**
* Factory method to return a separator to the client.

View file

@ -26,8 +26,8 @@ import java.util.Iterator;
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.edex.esb.Headers;
import com.raytheon.edex.exception.DecoderException;
@ -62,6 +62,7 @@ import com.raytheon.uf.edex.bufrtools.packets.IBUFRDataPacket;
* Nov 25, 2008 1684 chammack Camel Refactor
* May 15, 2013 1869 bsteffen Remove DataURI from goes/poes soundings.
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
* Dec 15, 2015 5166 kbisanz Update logging to use SLF4J
*
* </pre>
*
@ -75,7 +76,7 @@ public class GOESSoundingDecoder extends AbstractDecoder implements
public static final String PLUGIN_NAME = "goessounding";
/** The logger */
private final Log logger = LogFactory.getLog(getClass());
private final Logger logger = LoggerFactory.getLogger(getClass());
private PointDataDescription pdd;

View file

@ -24,8 +24,8 @@ import java.util.Calendar;
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.edex.plugin.goessounding.dao.GOESSoundingDAO;
import com.raytheon.uf.common.dataplugin.goessounding.GOESSounding;
@ -63,6 +63,7 @@ import com.raytheon.uf.edex.decodertools.core.IDecoderConstants;
* May 14, 2014 2536 bclement moved WMO Header to common, removed TimeTools usage
* Jul 23, 2014 3410 bclement location changed to floats
* Sep 16, 2014 3628 mapeters Replaced static imports.
* Dec 15, 2015 5166 kbisanz Update logging to use SLF4J
*
* </pre>
*
@ -71,8 +72,8 @@ import com.raytheon.uf.edex.decodertools.core.IDecoderConstants;
*/
public class GOESSoundingDataAdapter {
private static Log logger = LogFactory
.getLog(GOESSoundingDataAdapter.class);
private static Logger logger = LoggerFactory
.getLogger(GOESSoundingDataAdapter.class);
private static final String SPI_FILE = "goesBufr.spi";
@ -162,22 +163,23 @@ public class GOESSoundingDataAdapter {
index = SAT_YEAR_POS;
dp = dataList.get(index++);
year = getInt(dp,null);
year = getInt(dp, null);
// year = (dp.getValue() != null) ? ((Number) dp.getValue())
// .intValue() : null;
// year = (dp.getValue() != null) ? ((Number) dp.getValue())
// .intValue() : null;
dp = dataList.get(index++);
day = getInt(dp,null);
day = getInt(dp, null);
// day = (dp.getValue() != null) ? ((Number) dp.getValue()).intValue()
// : null;
// day = (dp.getValue() != null) ? ((Number)
// dp.getValue()).intValue()
// : null;
dp = dataList.get(index++);
lat = getDouble(dp,null);
// lat = ((Number) dp.getValue()).doubleValue();
lat = getDouble(dp, null);
// lat = ((Number) dp.getValue()).doubleValue();
dp = dataList.get(index++);
lon = getDouble(dp,null);
// lon = ((Number) dp.getValue()).doubleValue();
lon = getDouble(dp, null);
// lon = ((Number) dp.getValue()).doubleValue();
// If we have lat/lon data, set it into the obs object. Otherwise
// no need to go further, set the obs object to null and quit!
@ -202,19 +204,19 @@ public class GOESSoundingDataAdapter {
}
if (obsData != null) {
dp = dataList.get(index++);
hour = getInt(dp,null);
// hour = (dp.getValue() != null) ? ((Double) dp.getValue())
// .intValue() : null;
hour = getInt(dp, null);
// hour = (dp.getValue() != null) ? ((Double) dp.getValue())
// .intValue() : null;
dp = dataList.get(index++);
minute = getInt(dp,null);
// minute = (dp.getValue() != null) ? ((Double) dp.getValue())
// .intValue() : null;
minute = getInt(dp, null);
// minute = (dp.getValue() != null) ? ((Double) dp.getValue())
// .intValue() : null;
dp = dataList.get(index++);
seconds = getInt(dp,null);
// seconds = (dp.getValue() != null) ? ((Double) dp.getValue())
// .intValue() : null;
seconds = getInt(dp, null);
// seconds = (dp.getValue() != null) ? ((Double) dp.getValue())
// .intValue() : null;
Calendar baseTime = TimeUtil.newGmtCalendar(year, 1, 1);
baseTime.set(Calendar.DAY_OF_YEAR, day);
@ -247,27 +249,27 @@ public class GOESSoundingDataAdapter {
int n;
IBUFRDataPacket dp = dataList.get(SAT_ID_POS);
n = getInt(dp,-9999);
// n = (dp.getValue() != null) ? ((Long) dp.getValue()).intValue()
// : -9999;
n = getInt(dp, -9999);
// n = (dp.getValue() != null) ? ((Long) dp.getValue()).intValue()
// : -9999;
view.setInt("satid", n);
dp = dataList.get(SAT_PROC_INSTR);
n = getInt(dp,-9999);
// n = (dp.getValue() != null) ? ((Long) dp.getValue()).intValue()
// : -9999;
n = getInt(dp, -9999);
// n = (dp.getValue() != null) ? ((Long) dp.getValue()).intValue()
// : -9999;
view.setInt("satinstrument", n);
dp = dataList.get(SAT_QUAL_POS);
n = getInt(dp,-9999);
// n = (dp.getValue() != null) ? ((Long) dp.getValue()).intValue()
// : -9999;
n = getInt(dp, -9999);
// n = (dp.getValue() != null) ? ((Long) dp.getValue()).intValue()
// : -9999;
view.setInt("qualityinfo", n);
dp = dataList.get(SAT_CHANNELS_POS);
n = getInt(dp,-9999);
// n = (dp.getValue() != null) ? ((Long) dp.getValue()).intValue()
// : -9999;
n = getInt(dp, -9999);
// n = (dp.getValue() != null) ? ((Long) dp.getValue()).intValue()
// : -9999;
view.setInt("sounderchannels", n);
// TODO: need elevation
@ -375,11 +377,11 @@ public class GOESSoundingDataAdapter {
*/
private static Double getDouble(IBUFRDataPacket packet, Double defaultValue) {
Double retValue = defaultValue;
if(packet != null) {
if (packet != null) {
Object o = packet.getValue();
if(o instanceof Double) {
if (o instanceof Double) {
retValue = ((Double) o).doubleValue();
} else if(o instanceof Long) {
} else if (o instanceof Long) {
retValue = ((Long) o).doubleValue();
}
}
@ -394,19 +396,17 @@ public class GOESSoundingDataAdapter {
*/
private static Integer getInt(IBUFRDataPacket packet, Integer defaultValue) {
Integer retValue = defaultValue;
if(packet != null) {
if (packet != null) {
Object o = packet.getValue();
if(o instanceof Double) {
if (o instanceof Double) {
retValue = ((Double) o).intValue();
} else if(o instanceof Long) {
} else if (o instanceof Long) {
retValue = ((Long) o).intValue();
}
}
return retValue;
}
/**
*
* @return

View file

@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Poessounding Plug-in
Bundle-SymbolicName: com.raytheon.edex.plugin.poessounding
Bundle-Version: 1.14.0.qualifier
Bundle-Version: 1.15.0.qualifier
Bundle-Vendor: RAYTHEON
Require-Bundle: com.raytheon.edex.common,
com.raytheon.uf.edex.decodertools;bundle-version="1.0.0",
@ -23,4 +23,4 @@ Import-Package: com.raytheon.uf.common.dataplugin.poessounding,
com.raytheon.uf.edex.bufrtools.descriptors,
com.raytheon.uf.edex.bufrtools.packets,
com.raytheon.uf.edex.pointdata,
org.apache.commons.logging
org.slf4j

View file

@ -26,8 +26,8 @@ import java.util.Iterator;
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.edex.esb.Headers;
import com.raytheon.edex.exception.DecoderException;
@ -66,6 +66,7 @@ import com.raytheon.uf.edex.database.plugin.PluginFactory;
* correct file.
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
* May 14, 2014 2536 bclement moved WMO Header to common
* Dec 15, 2015 5166 kbisanz Update logging to use SLF4J
*
* </pre>
*
@ -79,7 +80,7 @@ public class POESSoundingDecoder extends AbstractDecoder implements
public static final String PLUGIN_NAME = "poessounding";
/** The logger */
private final Log logger = LogFactory.getLog(getClass());
private final Logger logger = LoggerFactory.getLogger(getClass());
private PointDataDescription pdd;

View file

@ -22,8 +22,8 @@ package com.raytheon.edex.plugin.poessounding;
import java.util.ArrayList;
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.plugin.AbstractRecordSeparator;
@ -48,8 +48,9 @@ import com.raytheon.uf.edex.bufrtools.packets.IBUFRDataPacket;
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 20080303 1026 jkorman Initial implementation.
* Mar 03, 2008 1026 jkorman Initial implementation.
* May 14, 2014 2536 bclement moved WMO Header to common
* Dec 15, 2015 5166 kbisanz Update logging to use SLF4J
*
* </pre>
*
@ -59,7 +60,7 @@ import com.raytheon.uf.edex.bufrtools.packets.IBUFRDataPacket;
public class POESSoundingSeparator extends AbstractRecordSeparator implements
IDescriptorFactorySelector {
private Log logger = LogFactory.getLog(getClass());
private Logger logger = LoggerFactory.getLogger(getClass());
private WMOHeader wmoHeader = null;

View file

@ -25,8 +25,8 @@ import java.util.Iterator;
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.edex.plugin.poessounding.dao.POESSoundingDAO;
import com.raytheon.uf.common.dataplugin.poessounding.POESSounding;
@ -61,6 +61,7 @@ import com.raytheon.uf.edex.decodertools.core.IDecoderConstants;
* correct file.
* May 14, 2014 2536 bclement moved WMO Header to common, removed TimeTools usage
* Jul 23, 2014 3410 bclement location changed to floats
* Dec 15, 2015 5166 kbisanz Update logging to use SLF4J
*
* </pre>
*
@ -69,8 +70,8 @@ import com.raytheon.uf.edex.decodertools.core.IDecoderConstants;
*/
public class POESSoundingDataAdapter {
private static Log logger = LogFactory
.getLog(POESSoundingDataAdapter.class);
private static Logger logger = LoggerFactory
.getLogger(POESSoundingDataAdapter.class);
private static final String SPI_FILE = "poesBufr.spi";
@ -155,9 +156,9 @@ public class POESSoundingDataAdapter {
IBUFRDataPacket dp = dataList.get(index++);
Double lat = getDouble(dp,null); // (Double) dp.getValue();
Double lat = getDouble(dp, null); // (Double) dp.getValue();
dp = dataList.get(index++);
Double lon = getDouble(dp,null); // (Double) dp.getValue();
Double lon = getDouble(dp, null); // (Double) dp.getValue();
// If we have lat/lon data, set it into the obs object. Otherwise
// no need to go further, set the obs object to null and quit!
@ -175,7 +176,8 @@ public class POESSoundingDataAdapter {
obsData.setLocation(location);
dp = dataList.get(SNDG_HGT);
Double elev = getDouble(dp,-9999.0); // (Double) dp.getValue();
Double elev = getDouble(dp, -9999.0); // (Double)
// dp.getValue();
location.setElevation(elev.intValue());
index = 0;
@ -290,11 +292,11 @@ public class POESSoundingDataAdapter {
*/
private static Double getDouble(IBUFRDataPacket packet, Double defaultValue) {
Double retValue = defaultValue;
if(packet != null) {
if (packet != null) {
Object o = packet.getValue();
if(o instanceof Double) {
if (o instanceof Double) {
retValue = ((Double) o).doubleValue();
} else if(o instanceof Long) {
} else if (o instanceof Long) {
retValue = ((Long) o).doubleValue();
}
}