Skip to content

Commit 4f5d669

Browse files
committed
Clean up logging facilities
* Added logging to TranslateFromTask * Made it easy to debug modules * Cleaned misc logging issues * Cleaned .gitignore Signed-off-by: Christopher Villalobos <[email protected]>
1 parent aa60164 commit 4f5d669

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,5 @@ target/*
77
*.tmp
88
nbactions.xml
99
run.sh
10-
1110
*.log
1211
/src/main/resources/git.properties

src/main/java/org/agmip/ui/quadui/QuadUIWindow.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ private void startTranslation() throws Exception {
253253
if (domeText.getText().equals("")) {
254254
toOutput(data);
255255
} else {
256-
LOG.warn("Attempting to apply a new DOME");
256+
LOG.debug("Attempting to apply a new DOME");
257257
applyDome(data);
258258
}
259259
} catch (Exception ex) {

src/main/java/org/agmip/ui/quadui/TranslateFromTask.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,11 @@
1212
import org.agmip.translators.dssat.DssatControllerInput;
1313
import org.agmip.translators.agmip.AgmipInput;
1414

15-
public class TranslateFromTask extends Task<HashMap> {
15+
import org.slf4j.Logger;
16+
import org.slf4j.LoggerFactory;
1617

18+
public class TranslateFromTask extends Task<HashMap> {
19+
private static final Logger LOG = LoggerFactory.getLogger(TranslateFromTask.class);
1720
private String file;
1821
private TranslatorInput translator;
1922

@@ -52,6 +55,7 @@ public HashMap<String, Object> execute() {
5255
HashMap<String, Object> output = new HashMap<String, Object>();
5356
try {
5457
output = (HashMap<String, Object>) translator.readFile(file);
58+
LOG.debug("Translate From Results: {}", output.toString());
5559
return output;
5660
} catch (Exception ex) {
5761
output.put("errors", ex.getMessage());

src/main/resources/logback.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
<logger name="org.agmip.dome" level="DEBUG" />
1414
<logger name="org.agmip.dome.DomeFunctions" level="DEBUG" />
1515
<logger name="org.agmip.ui.quadui" level="DEBUG" />
16+
<logger name="org.agmip.util.AcmoUtil" level="DEBUG" />
17+
<logger name="org.agmip.ui.quadui.TranslateFromTask" level="DEBUG" />
1618
-->
1719
<root level="INFO">
1820
<appender-ref ref="FILE" />

0 commit comments

Comments
 (0)