remove org.slf4j.Logger from com.raytheon.uf.edex.plugin.tcs due to circular dependency with ch.qos.logback
This commit is contained in:
parent
a7f8996b3f
commit
fde1719efc
5 changed files with 16 additions and 29 deletions
|
@ -21,5 +21,4 @@ Import-Package: com.raytheon.edex.esb,
|
|||
com.raytheon.uf.common.status,
|
||||
com.raytheon.uf.common.time,
|
||||
com.raytheon.uf.common.wmo,
|
||||
com.raytheon.uf.edex.core,
|
||||
org.slf4j
|
||||
com.raytheon.uf.edex.core
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
|
||||
package com.raytheon.uf.edex.plugin.tcs;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
//import org.slf4j.Logger;
|
||||
//import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.raytheon.edex.esb.Headers;
|
||||
import com.raytheon.uf.common.dataplugin.PluginDataObject;
|
||||
|
@ -48,7 +48,7 @@ import com.raytheon.uf.edex.plugin.tcs.decoder.TCSDataAdapter;
|
|||
* @version 1.0
|
||||
*/
|
||||
public class TCSDecoder {
|
||||
private static Logger logger = LoggerFactory.getLogger(TCSDecoder.class);
|
||||
//private static Logger logger = LoggerFactory.getLogger(TCSDecoder.class);
|
||||
|
||||
private final String pluginName;
|
||||
|
||||
|
@ -67,19 +67,12 @@ public class TCSDecoder {
|
|||
try {
|
||||
pdd = PointDataDescription.fromStream(this.getClass()
|
||||
.getResourceAsStream("/res/pointdata/tcs.xml"));
|
||||
|
||||
logger.debug("PointDataDescription loaded");
|
||||
|
||||
} catch (Exception e) {
|
||||
logger.error("PointDataDescription failed", e);
|
||||
logger.error("Plugin set to failSafe mode");
|
||||
setFailSafe(true);
|
||||
}
|
||||
try {
|
||||
createDAO(false);
|
||||
} catch (Exception e) {
|
||||
logger.error("Dao creation failed", e);
|
||||
logger.error("Plugin set to failSafe mode");
|
||||
setFailSafe(true);
|
||||
}
|
||||
}
|
||||
|
@ -102,8 +95,6 @@ public class TCSDecoder {
|
|||
return new PluginDataObject[0];
|
||||
}
|
||||
|
||||
logger.debug(traceId + " - Decoding data");
|
||||
|
||||
if (data != null && data.length > 0) {
|
||||
TropicalCycloneSummary tcs = null;
|
||||
try {
|
||||
|
@ -116,7 +107,7 @@ public class TCSDecoder {
|
|||
adapter.setData(data, traceId, headers);
|
||||
tcs = adapter.getDecodedData();
|
||||
} catch (Exception e) {
|
||||
logger.error(traceId + "-Error in decode", e);
|
||||
//logger.error(traceId + "-Error in decode", e);
|
||||
} finally {
|
||||
if ((tcs != null)) {
|
||||
decodedData = new PluginDataObject[] { tcs };
|
||||
|
@ -125,7 +116,7 @@ public class TCSDecoder {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
logger.info(traceId + "- No data in file");
|
||||
//logger.info(traceId + "- No data in file");
|
||||
decodedData = new PluginDataObject[0];
|
||||
}
|
||||
|
||||
|
@ -151,8 +142,6 @@ public class TCSDecoder {
|
|||
try {
|
||||
dao = new TropicalCycloneSummaryDao(pluginName);
|
||||
} catch (Exception e) {
|
||||
logger.error("TropicalCycloneSummaryDao creation failed", e);
|
||||
logger.error("Plugin set to failSafe mode");
|
||||
setFailSafe(true);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,7 +49,6 @@ public class NullData extends TCSDataAdapter{
|
|||
}
|
||||
|
||||
public List<TropicalCycloneSummary> findReports(byte [] message) {
|
||||
logger.info("Unknown data " + traceId);
|
||||
return new ArrayList<TropicalCycloneSummary>();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -322,13 +322,13 @@ public class TCMData extends TCSDataAdapter {
|
|||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("Error reading from reader", e);
|
||||
//logger.error("Error reading from reader", e);
|
||||
} finally {
|
||||
if (reader != null) {
|
||||
try {
|
||||
reader.close();
|
||||
} catch (IOException ioe) {
|
||||
logger.error("Error closing reader", ioe);
|
||||
//logger.error("Error closing reader", ioe);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,8 +24,8 @@ import java.util.HashMap;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
//import org.slf4j.Logger;
|
||||
//import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.raytheon.edex.esb.Headers;
|
||||
import com.raytheon.uf.common.dataplugin.exception.UnrecognizedDataException;
|
||||
|
@ -64,8 +64,8 @@ import com.raytheon.uf.edex.plugin.tcs.TropicalCycloneSummaryDao;
|
|||
*/
|
||||
public abstract class TCSDataAdapter implements TCSConstants {
|
||||
|
||||
protected static Logger logger = LoggerFactory
|
||||
.getLogger(TCSDataAdapter.class);
|
||||
// protected static Logger logger = LoggerFactory
|
||||
// .getLogger(TCSDataAdapter.class);
|
||||
|
||||
protected PointDataDescription pointDataDescription;
|
||||
|
||||
|
@ -104,7 +104,7 @@ public abstract class TCSDataAdapter implements TCSConstants {
|
|||
if (wmoHeader != null) {
|
||||
reports = findReports(message);
|
||||
} else {
|
||||
logger.error(traceId + "- Missing or invalid WMOHeader");
|
||||
//logger.error(traceId + "- Missing or invalid WMOHeader");
|
||||
}
|
||||
if ((reports != null) && (reports.size() > 0)) {
|
||||
currentReport = 0;
|
||||
|
@ -221,7 +221,7 @@ public abstract class TCSDataAdapter implements TCSConstants {
|
|||
currentReport = -1;
|
||||
} else {
|
||||
report = reports.get(currentReport++);
|
||||
logger.debug("Getting report " + report);
|
||||
//logger.debug("Getting report " + report);
|
||||
|
||||
if (URI_MAP.containsKey(report.getDataURI())) {
|
||||
report = null;
|
||||
|
@ -260,8 +260,8 @@ public abstract class TCSDataAdapter implements TCSConstants {
|
|||
adapter = new TCMData(pdd, dao, pluginName);
|
||||
} else {
|
||||
adapter = new NullData(pdd, dao, pluginName);
|
||||
logger.error("No decoder adapter for file "
|
||||
+ wmoHeader.getWmoHeader());
|
||||
// logger.error("No decoder adapter for file "
|
||||
// + wmoHeader.getWmoHeader());
|
||||
}
|
||||
|
||||
return adapter;
|
||||
|
|
Loading…
Add table
Reference in a new issue