Is it possible to disable TimingLogger lines in log file?

115 Views Asked by At

We are using Cassandra as our database and use Hector to talk to Cassandra.

In our log file there're tons of following lines:

2015-10-15 08:53:50,798 INFO m.p.cassandra.hector.TimingLogger - start[1444910030795] time[3] tag[READ.success_] 2015-10-15 08:53:50,798 INFO m.p.cassandra.hector.TimingLogger - start[1444910030797] time[1] tag[WRITE.success_]

Speed4j is logging in INFO level and it logs all "hector.TimeLogger" lines. The issue I have is we cannot modify the executable jar file. Therefore, is it possible to find other ways to mute those lines? Or what should we configure/modify if we can modify the source code? Thanks!

1

There are 1 best solutions below

0
Friwi On

You can write another Java program that redirects only some lines to another log. You can read a file with an BufferedInputStream while its beeing written.

More information on such a "file redirection" is here: How do I use Java to read from a file that is actively being written?

This does not fix the additional lines in log, but you could create a second clean log with it