Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
Tobias Hübner 71871a86d6 readme fix 5 miesięcy temu
src readme and refactor 5 miesięcy temu
.gitignore init 5 miesięcy temu
README.md readme fix 5 miesięcy temu
build.gradle.kts init 5 miesięcy temu
gradlew init 5 miesięcy temu
gradlew.bat init 5 miesięcy temu
settings.gradle.kts init 5 miesięcy temu

README.md

Logging

Thread Safe fast access logger. When using most log frameworks it always bothered me that you had to initialize multiple loggers and even pass them down everywhere.

This is an attempt to reduce the boiler plate code using one static abstract class, that can be initialized with any logger that implements a predefined interface.

Usage


public static void main(String[] args){
    // initialize a Logger
    FileLogger fl = new FileLogger("/path/to/logs");
    LogPoint.initialize(fl);
    
    LogPoint.log(LogLevel.Trace, "your message");
    LogPoint.log(new Exception("an exception has occured"));
}

After initialization logs can be send anywhere using the static method.

The Logger is also written in a way to be compatible, meaning you don’t have to initialize it. If you log messages to it, without initializing it, it will simply print them to System.out.