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

Do not fill in LogRecord caller data by default in slf4j wrapper #3116

Merged
merged 1 commit into from
Dec 18, 2021

Conversation

Janmm14
Copy link
Contributor

@Janmm14 Janmm14 commented Jun 13, 2021

I am no expert with slf4j/java1.4 logging framework, but as bungeecord by default does not use the caller data, it should be safe to not fill it in by default.
Added system property net.md_5.bungee.slf4j-caller-data to restore current behaviour in case custom logging requires caller data.

Should slightly improve performance of bungeecord.

Closes #3112

@md-5
Copy link
Member

md-5 commented Jun 13, 2021

But Bungeecord doesn't even use slf4j by itself, only plugins can log things to it in the first place

@Janmm14
Copy link
Contributor Author

Janmm14 commented Jun 13, 2021

I meant that eventual plugins or libs using slf4j logging which we bridge to java Loggers dont fill LogRecords with data which is not used by bungee's loggers in the end.

@KotlinFactory
Copy link

Great work, I wrote my own logger impl but this should make BungeeCords slf4j more usable.

@Janmm14 Janmm14 force-pushed the slf4j-no-caller-data-by-default branch 2 times, most recently from 71bc871 to 89368e2 Compare November 29, 2021 11:34
@Janmm14 Janmm14 force-pushed the slf4j-no-caller-data-by-default branch from 89368e2 to 910a7f1 Compare November 29, 2021 11:34
@Janmm14 Janmm14 requested a review from md-5 November 29, 2021 11:35
@md-5 md-5 self-assigned this Nov 29, 2021
@Janmm14
Copy link
Contributor Author

Janmm14 commented Dec 14, 2021

@md-5 So this self-assign means that you are going to change some stuff and then handle this?

@md-5 md-5 merged commit 3a11656 into SpigotMC:master Dec 18, 2021
@Janmm14 Janmm14 deleted the slf4j-no-caller-data-by-default branch December 19, 2021 00:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[performance] JDK14LoggerAdapter class creates many exceptions
3 participants