简体   繁体   English

Java中,如何同时监视多个日志文件

[英]in Java, how to monitor several log files concurrently

我想同时监视几个日志文件。如何在Java中执行?

Hard to understand what you want to do, so I will guess :) 很难理解您想做什么,所以我会猜测:)

Use the Apache Commons IO class named Tailer to tail the files that you want to keep track of. 使用名为Tailer的Apache Commons IO类拖尾要跟踪的文件。 (If reading from them is what you want to do). (如果您想从他们那里读书)。 The javadoc for the class has examples of how to use it with threads. 该类的javadoc包含如何与线程一起使用的示例。

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

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