Output -> file -> codec -> json writing in a single line instead of writing as new line for every set


(Murugan Mani) #1

output -> file -> codec -> json writing in a single line instead of writing as new line for every set.
its hard for nxlog to parse thru thee output because there is no new line . its always a single line and never ending.

eg:
{"name":8,"@version":"1","@timestamp":"2016-11-09T06:40:00.789Z","type":"datadog1","app":"abc","time":"2016-11-09T06:40:00.789Z","field":"ppa","terminal":"openstack"}{"name":9,"@version":"1","@timestamp":"2016-11-09T06:40:00.789Z","type":"datadog","app":"abc","time":"2016-11-09T06:42:00.789Z","field":"ppa","terminal":"openstack"}


(Magnus B├Ąck) #2

Use the json_lines codec instead.


(Murugan Mani) #3

nope.. its not working.. may be this is bit different.. i tried the json as codec in my local(windows).. it worked simply fine as expected by line by line.. when i run in centos, its strange.. any thoughts on that?


(system) #4

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.