Fixed rawfile_json returner output format. It outputted python object

instead of standard json.
This commit is contained in:
hkrist 2017-03-09 21:32:40 +01:00
parent 801ff28053
commit 4d0ddcd110

View file

@ -58,7 +58,7 @@ def returner(ret):
opts = _get_options({}) # Pass in empty ret, since this is a list of events
try:
with salt.utils.flopen(opts['filename'], 'a') as logfile:
logfile.write(str(ret)+'\n')
logfile.write(json.dumps(ret)+'\n')
except:
log.error('Could not write to rawdata_json file {0}'.format(opts['filename']))
raise