CloudburstMC / Cloudburst

Cloudburst Server is a Bedrock first server software. Originally forked from Cloudburst Nukkit.
178 stars 70 forks source link

Refactor log4j2 logging #138

Closed Kazzuk closed 2 years ago

Kazzuk commented 2 years ago

When using %-5level, it would return the priority level justified to a width of 5 characters, so for example if the level was INFO, you would be left with a trailing space after the level like so "INFO". Using %level instead resolves this.

Before example: image After example: image

SupremeMortal commented 2 years ago

This was done for consistency so the spacing for each log entry is exactly the same.

Current format

[FATAL] 1234567890
[ERROR] 1234567890
[WARN ] 1234567890
[INFO ] 1234567890
[DEBUG] 1234567890
[TRACE] 1234567890

Proposed format

[FATAL] 1234567890
[ERROR] 1234567890
[WARN] 1234567890
[INFO] 1234567890
[DEBUG] 1234567890
[TRACE] 1234567890