Exchange 协议日志的日志解析器错误

Exchange 协议日志的日志解析器错误

我最近遇到了 Microsoft Log Parser。这是一个很棒的工具。我正在解析 Exchange 接收连接器协议日志,但在 IISW3C 格式中遇到了此错误。

C:\TEMP>logparser "SELECT * FROM RECV20170706-1.LOG" -i:IISW3C
Task completed with parse errors.

Parse errors:
4 parse errors occurred during processing (To see details about the parse
  error(s), execute the command again with a non-zero value for the "-e"
  argument)

Statistics:
-----------
Elements processed: 0
Elements output:    0
Execution time:     0.06 seconds

使用-e不能修复它

C:\TEMP>logparser "SELECT * FROM RECV20170706-1.LOG" -i:IISW3C -e 5
Task completed with parse errors.
Parse errors:
Cannot find '#Fields' directive in header of file "C:\TEMP\RECV20170706-1.LOG". Lines 1 to 1 have been ignored
Error while parsing Date directive: missing space between Date and Time LogFile "C:\TEMP\RECV20170706-1.LOG", Row number 4, Directive '#Date:2017-07-06T00:00:04.363Z #Fields'
Unknown field date-time,connector-id,session-id,sequence-number,local-endpoint,remote-endpoint,event,data,context found in #Fields directive
Cannot find '#Fields' directive in header of file "C:\TEMP\RECV20170706-1.LOG". Lines 6 to 39711 have been ignored

我尝试了 Log Parser 2.2 支持的所有输入格式(IISW3C、NCSA、IIS、IISODBC、BIN、IISMSID、HTTPERR、URLSCAN、CSV、TSV、W3C、XML、EVT、ETW、NETMON、REG、ADS、TEXTLINE、TEXTWORD、FS、COM)。我在使用其他格式时也遇到了类似的错误。我可以毫无困难地使用 GUI 工具 Log Parser Studio,但我更喜欢使用命令行。我注意到 GUI 使用不同的输入格式 EELLog 进行解析。

这些是我的问题;

  • Exchange-Extensible-Logging 是唯一接受的格式吗?
  • 我可以将 EEL 输入格式作为命令行实用程序的附加组件吗?
  • Log Parser Studio 中是否有命令行开关或其他可执行文件允许我在 CMD 上运行它?
  • 我可以稍微修改一下标题和指令并实现成功的IISW3C格式渲染吗?

更新

使用时出错-i:w3c

C:\TEMP>logparser -i:w3c "SELECT [data] FROM RECV20170705-1.LOG"
Error: SELECT clause: Syntax Error: unknown field 'data'.
The closest match for input format 'W3C' is 'date-time,connector-id,session-id,sequence-number,local-endpoint,remote-endpoint,event,data,context'.

To see valid fields for the W3C input format type:
LogParser -h -i:W3C

相关内容