Skip to content

Super simple library for super easy console logging

License

Notifications You must be signed in to change notification settings

m4schini/FancyLog

Repository files navigation

FancyLog

GitHub GitHub release (latest by date) Maven Central

Super simple library for super easy console logging

Installation

Include the Maven artifact:

<dependency>
    <groupId>com.github.m4schini</groupId>
    <artifactId>FancyLog</artifactId>
    <version>2.1.2</version>
</dependency>

Or include the JAR in your project.

Features

Every line is printed with a timestamp: "HH:mm:ss > "

Log.status(Object text);    //Standard println output
Log.success(Object text);   //green text
Log.warning(Object text);   //"Warning: " yellow text
Log.error(Object text);     //"Error: " red text
Log.critical(Object text);  //"Critical: " Red background and black text   

Log.divide();   //Prints: -------------------------------------

In Console Looks

You can also print a loadingbar if your programm, well, needs to load something... This was propably kind of obvious.

//Range: 0-10
Log.loading(10);  =>  |##############################| 100%
Log.loading(0);   =>  |                              |  0%

Log.loading(-1);  =>  |------------------------------| 0%

You can easily turn logging on and off.

Log.enableLog(true);        //enable log
Log.enableLog(false);       //disable log