Azad
Azad

Reputation: 399

Java Logging Framework and Log Analyzer

I'm developing over Primefaces with EJB3. I need a logging framework to monitor and track application's users and extract statistics. Does anyone know, what options I have for both logging and log analyzing?

Thanks in adavnce

Upvotes: 1

Views: 2221

Answers (5)

You clarified that you were not looking for how to log, but how to process the logs.

First of all there is viewers, Apache Chainsaw for log4j, and Lilith for logback+log4j+JDK14 logging. This is useful for seeing just the items you need.

For dedicated report generators I do not believe there is any based on raw logs. You may, however, use the Unix utilities grep, awk/perl to extract the information you need and manually generate input files to visualization tools or report generators. Problem here is that the things you typically want to know from logs are hard to predict. If you have an actual need then find out how you can generate the information you need using logs (markers in slf4j are nice) and then just post massage those logs into the format you need for further processing.

Upvotes: 0

dharam
dharam

Reputation: 8106

Java provides an efficient logging framework. With plenty of logging levels : FINE, FINER, FINEST, WARNING, SEVERE.

Moreover, You have another extensive logging framework log4j with Levels DEBUG, SEVERE etc.

Chose whatever you want. Log4j is easier if you want to push different logs in different files.

You can later analyze with grep/awk utils in linux as mentioned by dbf.

Upvotes: 0

Geoffrey De Vylder
Geoffrey De Vylder

Reputation: 4153

I have always used log4j for logging as it is not that hard to set up and has most of the features one would need. You can find it here. I have never used a log analyzer before but it seems apache has one to analyze log4j output: chainsaw

Upvotes: 0

Samson
Samson

Reputation: 2821

Take a look at Simple Logging Facade for Java (SLF4J)

Upvotes: 1

dbf
dbf

Reputation: 6499

Solution depends on your requirements. You can log it to text file with any log library like log4j and analyze using linux utils like grep/awk/etc, or write it to database and analyze with SQL, or write to NoSQL storage and alalyze it using your code.

Upvotes: 0

Related Questions