8 Java Log Frameworks most commonly used by Java programmers

Source: Internet
Author: User
Tags apache log logstash log4j

1. log4j– Most popular Java log components

Log4j is a Java-based open source log component, log4j is very powerful, we can output log information to the console, file, user interface, can also output to the operating system's event logger and some system resident process. It is also worth mentioning that log4j allows you to customize the log format and log level very easily, helping developers to control the log information in all directions.

Official website: http://logging.apache.org/log4j/2.x/

Here is a simple example of using log4j:

Package Com.mai.test;import Org.apache.log4j.logger;import Org.apache.log4j.propertyconfigurator;public class log4jtest {public static void main (string[] args) {Logger log = Logger.getlogger (Log4jtest.class); Propertyconfigurator.configure ("Src/log4j.properties"), Log.debug ("Yes,debug"), Log.info ("Yes,info"); Log.error (" Yes,error "); Log.warn (" Yes,warn ");}}
2. Gclogviewer–java Log Viewing tool

Gclogviewer is a GC log visualizer that supports JDK 6, and the Gclogviewer supports a trend graph of GC generation based on GC log, as well as the data trend graph needed to generate tuning recommendations, compared to Gcviewer.

Official website: http://code.google.com/p/gclogviewer/

3. slf4j– API-based Java log framework

SLF4J provides a simple, unified logging interface that allows developers to implement the logging functionality only when configured and deployed. Logging API implementation can choose to directly implement SLF4J loging APIs such as: Nlog4j, Simplelogger. It is also possible to develop appropriate adapters such as Log4jloggeradapter, jdk14loggeradapter through the API implementations provided by SLF4J.

Official website: http://www.slf4j.org/

4. Flume–apache Log Server

Previously described are a number of logging tools, Flume is a log analysis system, Flume is distributed, it has a very flexible architecture to collect, aggregate and move a large number of log data, and provide a reliable, fault-tolerant system architecture.

Official website: http://flume.apache.org/

5. zlogfabric– Log Storage System

Zlogfabric is an integrated cross-platform logging solution that collects log information from individual applications to a centralized system through the messaging system. The modular design allows the server to store, forward, alert, and generate log statistics for logs.

Zlogfabric can collect data from files, syslog, log4j, log4net, and Windows events.

Official website: http://www.zlogfabric.com/

6. Logstash–java Log Management tool

Logstash is a very powerful log management tool that enables you to transfer, process, manage, and retrieve logs, and provides web interfaces for developers to count and query log information with Logstash.

Official website: http://www.logstash.net/

7, Commons Logging

The implementation of the Commons logging does not depend on the specific log Implementation tool, but provides some abstract interfaces for log operations, and it encapsulates other logging tools such as log4j, Avalon Logkit, and JDK 1.4.

Official website: http://commons.apache.org/proper/commons-logging/

8, Darks Logs

Darks logs and log4j are similar, but also for Java, Android and other projects, but darks logs the use of more simple, and the Android side has made a great improvement. Darks logs adds appender to SQLite's log save. It is designed to address issues such as the inability of Android logs to control frequently used operations such as log levels, formatting, saving or displaying targets.

Official website: https://github.com/liulhdarks/darks-logs


8 Java Log frameworks most commonly used by Java programmers

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.