Skip to content

Commit

Permalink
blank line after indented-JSON datagram
Browse files Browse the repository at this point in the history
  • Loading branch information
sflow committed Dec 10, 2018
1 parent e1801ca commit e6399b7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/sflowtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -5165,6 +5165,10 @@ static void receiveSFlowDatagram(SFSample *sample)
if(sfConfig.outputFormat == SFLFMT_JSON) {
/* reset depth in case an exception left it hanging */
sfConfig.outputDepth = 0;
/* add blank line if pretty-printing */
if(sfConfig.jsonIndent)
putchar('\n');

}
else if(sfConfig.outputFormat == SFLFMT_LINE_CUSTOM) {
/* clear datagram-scoped field values */
Expand Down

0 comments on commit e6399b7

Please sign in to comment.