解码键值对 [英] Decode Key Value Pairs
问题描述
消息Nalyzer可以解码日志文件格式为< DateTime> <钥匙及GT; =<值> < Key2> =< Value2>?
Can Message Nalyzer decode logfile that are in the form of <DateTime> <Key>=<Value> <Key2>=<Value2>?
例如
08.09.2016 19:55:58 MyField1="test" MyField2="dummy"
08.09.2016 19:56:58 MyField1="test" MyField2="dummy"
08.09.2016 19:59:58 MyField1="test" MyField2="dummy"
如果没有,我可以为此添加自定义解析器吗?
If not, could I add a custom parser for that?
感谢您的帮助。
Meinrad
推荐答案
您可以编写自定义解析器,但必须收集字段名称作为地图,您在过滤器中写的表达式看起来像your_module.fields [" test"] =" dummy"而不是your_module.test =" dummy"。 HTTP
解析器在解析头中的字段时执行相同的操作,因为它们也被描述为值对。
You can write a custom parser, but the field names will have to be collected as a map, so that the expression you write in filters look like your_module.fields["test"]="dummy" instead of your_module.test="dummy". The HTTP parser does the same thing when it parses fields in headers, since they are also described as value pairs.
您可以在我们发布的文件中看到日志解析器的示例使用该产品可能有助于您了解如何开始使用。 它们位于%LOCALAPPDATA%\ Microsoft &\\MessageAnalyzer \ OPNAndConfiguration \TextLogConfiguration中。 如果您需要
更多帮助,请告诉我们。
You can see examples of log parsers in the ones we ship with the product and this might help you understand how to get started. They are located in %LOCALAPPDATA%\Microsoft\MessageAnalyzer\OPNAndConfiguration\TextLogConfiguration. If you need more help, let us know.
Paul
这篇关于解码键值对的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!