构建日志解析器分析器

时间:2015-02-25 10:50:53

标签: python

我是最后一年的学生,我的项目是构建一个日志解析器分析器。 我打算利用python编写一个脚本来解析跨平台的任何日志文件(windows,Linux..etc)。 如果有人能解释我的工作流程,比如从哪里开始以及如何编写日志解析器,我将非常感激。

1 个答案:

答案 0 :(得分:0)

这只是为了开始:

my assumption is: the logfiles will be flat files

questions that you probably need to answer before getting into the code:
  will all the logfiles have the same layout or may each have a separate configuration?                    
  what constitutes a record?
  what constitutes a field?
  what are their delimiters?
  how will the parse results be presented?  and how often?