user851094
user851094

Reputation: 453

Log parser process is not allowing log4j to rotate the logs

I wrote a log parser that constantly reads the log file gets specific lines from the log and writes them into database. Logs are generated via LOG4J. Logs are being rotated when they reach specific size. My problem is that my log parser process is not allowing log4j to rotate the logs.

Can you please advice on this.

Regards.

Upvotes: 1

Views: 260

Answers (1)

MaDa
MaDa

Reputation: 10762

A cleaner solution would be to use org.apache.log4j.jdbc.JDBCAppender for the log statements that you want in the database, and have log4j insert them directly.

Upvotes: 1

Related Questions