简体   繁体   English

日志解析器解决方案python / perl与Java

[英]Log parser solutions python/perl vs Java

I know perl and python is tested solution for this kind of log parsing and data mining - 我知道perl和python是经过测试的解决方案,可用于此类日志解析和数据挖掘-

Anybody have experience dealing with syslog parsing with Java ? 任何人都具有使用Java处理syslog解析的经验吗?

I have to create a Java demon anyway to load the parsed output to DB .. So I was thinking why not going all the way - 无论如何,我都必须创建一个Java守护程序才能将已解析的输出加载到数据库中。所以我在想为什么不一直这样做-

python might be useful when I will be running it on different environment. 当我要在其他环境上运行python时,它可能会很有用。

I translated some Java GC log parser/analyzer from Perl to Java. 我将一些Java GC日志解析器/分析器从Perl转换为Java。 In Java the code looked like more lines and the code obviously more verbose but the execution was at least 5 times faster. 在Java中,代码看起来像更多的行,并且代码显然更冗长,但是执行速度至少快了5倍。

I recently started writing python scripts, but recently i wrote a java gc log parser to print the timestamp when a gc happened and counts etc, and i found Python real easy in writing it. 我最近开始写python脚本,但是最近我写了一个Java gc日志解析器来打印gc发生和计数等时的时间戳,我发现Python真正易于编写。 What kind of fields are you interested while parsing the syslogs? 您在解析系统日志时感兴趣的字段是什么? I think if you know what you are looking for in the logs(patterns etc) then it becomes easy to write a script which would do that for you. 我认为,如果您知道要在日志中找到的内容(模式等),那么编写脚本便会很容易,它将为您完成此任务。

Ankit. 安吉

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM