taillistener

in java taillistener, how to handle more log files

混江龙づ霸主 提交于 2020-01-15 09:15:51
问题 I am using java taillistener to monitor my log files.Whenever log files are updated,it will print the log message.when motoring one or two log files,it working fine.But when trying to monitoring more file(say 10 files),there is no messages displayed in console even logs are updated in log file.My code is given below. ScheduledThreadPoolExecutor logMonitorThreadPoolExec; if (listOfFiles[i].isFile()) { files = listOfFiles[i].getName(); File pcounter_log = new File(files); Tailer logMessages =