Skip to content
This repository has been archived by the owner on Sep 20, 2018. It is now read-only.

thatlittlegit-archive/wlogger4j

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DEPRECATION NOTICE

wLogger4j can be replaced with java.util.logging; please use it with a custom formatter instead of this huge package.

wLogger4j

Because Apache Log4j never seems to work... 👎

wLogger4j is a simplistic version of Log4j. It's not extremely customizable (yet), but it's just what's necessary for a simple program.

Usage

This program will log with every level available.

import wlogga4j.Logger;

public class Example {
    /*
     Create a logger instance.
     Will output "Hello, World!", with level INFO on September 22nd 2013 at
     8:00:01, as:
     [22/09/2013][8:00:01][ExampleProgram/INFO] Hello, World!
    */
    static final LOGGER = new Logger("ExampleProgram");

    public static void main(String args[]) {
        LOGGER.log(Level.INFO, "Hello, World!"); // Level INFO
        LOGGER.trace("Hello, World!"); // Level TRACE
        LOGGER.debug("Hello, World!"); // Level DEBUG
        LOGGER.finer("Hello, World!"); // Level FINER
        LOGGER.fine("Hello, World!"); // Level FINE
        LOGGER.info("Hello, World!"); // Level INFO
        LOGGER.warn("Hello, World!"); // Level WARN
        LOGGER.error("Hello, World!"); // Level ERROR
        LOGGER.fatal("Hello, World!"); // Level FATAL D:
    }
}

About

Logging framework for Java.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages