Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Logs: log4j or lucene? [closed]

We are building a web app, and my boss insists on using lucene, because the logs will be indexed and the admin can search and query it after.

But, IMHO, lucene is an indexing API, so, I think that the correct is use it to index things, not to store logs. The admin usually is a admin, not a dumb user. He could perfectly open the log files and search inside it with a CTRL+F like shortcut.

log4j is an log API, so, it means that it should be used to log things. I think that it is the correct choice.

Am I right? What do you think about it? Exists a API that could be used to query a log file?

thanks.

like image 548
caarlos0 Avatar asked Jan 27 '12 12:01

caarlos0


1 Answers

The Lucene Homepage states: "Apache Lucene(TM) is a high-performance, full-featured text search engine library written entirely in Java. It is a technology suitable for nearly any application that requires full-text search, especially cross-platform. "

It is definitely not a logging framework and I wont recommed it for this issue. Use log4j for logging or distributed loggig with Syslog4j.

like image 91
tuergeist Avatar answered Oct 01 '22 15:10

tuergeist