Skip to content

Commit

Permalink
improved logging
Browse files Browse the repository at this point in the history
  • Loading branch information
hame-c8y committed Feb 4, 2023
1 parent aa35850 commit 0a79c6e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
8 changes: 3 additions & 5 deletions src/main/java/c8y/rss/alarm/ReadAlarms.java
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,10 @@ public String buildAlarmFeed(AlarmFilter alarmFilter, int feedSize) {
transformer.setOutputProperty(OutputKeys.INDENT, "yes");
transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2");
transformer.transform(source, result);
logger.info("\n" + writer.toString());
logger.debug("\n" + writer.toString());
return writer.toString();
} catch (ParserConfigurationException pce) {
pce.printStackTrace();
} catch (TransformerException tfe) {
tfe.printStackTrace();
} catch (ParserConfigurationException | TransformerException e) {
logger.error("Error creating event rss feed: ", e);
}
return "";
}
Expand Down
8 changes: 3 additions & 5 deletions src/main/java/c8y/rss/event/ReadEvents.java
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,10 @@ private String buildEventFeed(EventFilter eventFilter, int feedSize) {
transformer.setOutputProperty(OutputKeys.INDENT, "yes");
transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2");
transformer.transform(source, result);
logger.info("\n" + writer.toString());
logger.debug("\n" + writer.toString());
return writer.toString();
} catch (ParserConfigurationException pce) {
pce.printStackTrace();
} catch (TransformerException tfe) {
tfe.printStackTrace();
} catch (ParserConfigurationException | TransformerException e) {
logger.error("Error creating event rss feed: ", e);
}
return "";
}
Expand Down

0 comments on commit 0a79c6e

Please sign in to comment.