简体   繁体   English

日志文件解析器-计数调用

[英]Log file parser - count invocations

My scenario is to find - count of invocations of a specific method which is called on a condition. 我的场景是查找-在条件上调用的特定方法的调用计数。

Every invocation of the method makes a entry into log file with a combination of static + dynamic content. 每次调用该方法都会通过静态和动态内容的组合进入日志文件。

So with the help of static text, I need to parse the log file(very massive) and find the count. 因此,在静态文本的帮助下,我需要解析日志文件(非常大)并找到计数。

Is there any tool available for this ? 有任何可用的工具吗? I know a java program using reader would do the job(as explained here ), but searching for a existing tool / way to do. 我知道使用读卡器将做的工作(如解释Java程序在这里 ),但寻找一个现有的工具/办法的事情。

Thanks !! 谢谢 !!

Assuming you need to do this manually, use grep and wc on the command line. 假设您需要手动执行此操作,请在命令行上使用grep和wc。 (If you need this to run automatically or be invoked from a program you'll have to explain a bit more about the situation) (如果您需要自动运行或从程序中调用它,则必须对情况进行更多说明)

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

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