Flattr tinylog GitHub


tinylog is a lightweight logging framework for Java, optimized for ease of use.

Ease of use

The logger of tinylog is static, so it isn't necessary to create an instance of the logger before logging. By default all log entries of the level info or higher are written to the console.

import org.pmw.tinylog.Logger; public class Application { public static void main(String[] args) { Logger.info("Hello World!"); } }

You will see something like this in your console:

2016-08-31 09:49:07 [main] Application.main()
INFO: Hello World!


tinylog can be configured by statements, arguments and/or a properties file.

So log entries of the level warning or higher can be written to a file:


or in Java:

Configurator.defaultConfig() .writer(new FileWriter("log.txt")) .level(Level.WARNING) .activate();

You can find the full list of statements and arguments in the documentation.


tinylog is very small, so it's simple to optimize the logger's speed e.g. by precompiled patterns. The result can be seen in the benchmark. There tinylog was up to four times faster than the popular log4j!


tinylog is thread-safe. So the logger can be used in multi-threaded programs without the need of locking. All log entries are always created and written as a whole. Running on machines with multiple cores, tinylog benefits from the additional cores.


As the name "tinylog" implies, tinylog is very small. The tinylog JAR has a size of only 80KB!