我正在学习 nxlog,但在当前文档中可能没有解析 xml 输入的示例。
我的输入行如下所示:
<Msg time='2014-06-27T00:27:38' type='ERROR' code='5000' target='Some.Target' machine='DEV-Machine' process='2408' thread='160' elapsed='0.00000'>The message.</Msg>
我有
<Input my_input>
Module im_file
File 'C:\logs\\*.dat'
Exec parse_xml(); to_json();
</Input>
仅产生:
{"EventReceivedTime":"2014-06-27 01:13:28","SourceModuleName":"my_input","SourceModuleType":"im_file"}
如何将属性放入 json 字段?