Merge pull request #39933 from hkrist/fix-rawfile_json_returner-format

Fixed rawfile_json returner output format.
This commit is contained in:
Mike Place 2017-03-09 17:20:51 -07:00 committed by GitHub
commit 2e68edee4a

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