Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log4j message formatting #1239

Open
TheStachelfisch opened this issue Jan 1, 2022 · 0 comments · May be fixed by #1460
Open

Log4j message formatting #1239

TheStachelfisch opened this issue Jan 1, 2022 · 0 comments · May be fixed by #1460

Comments

@TheStachelfisch
Copy link

Is your feature request related to a problem? Please describe.

Currently debugging Minecraft through GDLauncher's integrated dev console can be quite frustrating due to none of the Log4j messages being formatted and them still being in their raw XML format.

Describe the solution you'd like

An option that is enabled by default to toggle Log4j message formatting.
The formatting would as an example look like this.

Raw output

<log4j:Event logger="FML" timestamp="1641045271634" level="DEBUG" thread="Client thread">
   <log4j:Message><![CDATA[Bar Finished: Loading took 19.195s]]></log4j:Message>
</log4j:Event>

Formatted output

[14:47:14] [Client thread/DEBUG]: Bar Finished: Loading took 19.195s

[TIMESTAMP] [THREAD/LEVEL]: FORMATTED_MESSAGE

Another feature that is related to this would be specifying a custom formatted output. For instance something
like this (TIMESTAMP_TIME) [LOGGER/LEVEL] - FORMATTED_MESSAGE. Here the specified fields would be replaced by the xml log message fields.

TIMESTAMP_TIME = "14:47:14"
LOGGER = "FML"
LEVEL = "DEBUG"
FORMATTED_MESSAGE = "Bar Finished: Loading took 19.195s"

Describe alternatives you've considered

Currently you can copy also look at the latest.log file generated during Minecraft, this unfortunately makes on-the-fly debugging very hard, since you always have to open the file again.

Additional context

No additional context

@Eskaan Eskaan linked a pull request Oct 20, 2022 that will close this issue
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

1 participant