Java logging framework tinylog 2.2 compressed log files with gzip

Java Logging Framework Tinylog 2.2 Compressed log files with GZIP

With the new version 2.2 Can compress the source-off Java logging framework Tinylog log files. There are two new tokens for formatting and a migration of automatic modules on regular Jigsaw modules.

Compression with Gzip

For the curious compression, the framework sets the GZIP format. If you are activated in the Rolling-File Writer, Tinylog nevertheless writes all log entry as plain text in the current log file. However, as soon as Tinylog overlaps the next log file, the old log file is compressed in the background. This will continue to open the current log file as a plain text in the text editor. However, the old log files require less storage space due to the GZIP compression.

The Rolling File Writer is intended to start a new log file with a new file name in regularly. This makes it more difficult to monitor the automatic monitoring of the current log file by monitoring tools, as they usually expect a static file name for log files. In the new version Tinylog optionally can optionally generate a hard link with a static file name for the current log file. The framework updates the hard link every time you start a new log file, so it always points to the current log file. From the view of Monitoring Tools, the hard link behaves like a regular file whose content can be observed.

Formatting of log entering and modularity

Tinylog 2.2 leads to formatting the output of log entering two new tokens. With the uptime token, it can be output for each log entry as long as the application is already running at this time. The level code tokens, however, can output the Severity Level of a log entry as a numerical value.

Tinylog 2 migrated in the new version.2 of automatic modules on regular Jigsaw modules. This means that every JAR brings its own module info file. Thus, the dependencies are transparent and can be detected and dissected by the Java Platform Module System (JPMS). In practice means that Tinylog is now complete with JLink compatible and use in self-created modular runtime images.

In the new version, Tinylog throws a unsupported operation exception when trying to uplift a frozen configuration. Furthermore, there is now a getter configuration.Isfrozen () to run the configuration status at runtime. For the output of tagged logic entries can be assigned several tags in the new version of the logging framework to a Writer in the configuration. If one or more tags are assigned to a Writer, these only output logic entries that are equipped with a suitable tag and ignores the others.


With the new version, Tinylog sets the support for Java 6 and instead requires at least Java 7 to Regular JVMS. However, the logging framework will continue to be delivered as a Java 6 byte code. The reason is the compatibility with Android. Under Android Tinylog sets only the API level 1. The logging framework is thus still compatible with all Android versions.

Further information can be found on the Tinylog website and here in particular in the envision. The main innovations have already been presented to the Release Candidate.

Like this post? Please share to your friends:
Leave a Reply

;-) :| :x :twisted: :smile: :shock: :sad: :roll: :razz: :oops: :o :mrgreen: :lol: :idea: :grin: :evil: :cry: :cool: :arrow: :???: :?: :!: