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
Replace printStackTrace() with a proper logger #3739
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a fair few places we call e.PrintStackTrace()
, mind fixing those up in one fell swoop?
There are still other |
2bcfef4
to
4be162b
Compare
I have now replaced all |
src/main/java/org/spongepowered/common/block/entity/SpongeBlockEntityArchetypeBuilder.java
Outdated
Show resolved
Hide resolved
I am aware at the amount of effort of such a change but zml you are 100% right, the "global logger" is not helpful, not to know where whatever is coming from. I think it is time to likely axe it so |
From a developer point of view, I prefer each class having its own logger.
|
@Yeregorix I agree. However classes such as DataUpdaterDelegate fall right into this issue in this PR, no? I'd have to look at our typical log files but someone wouldn't know based on the logging lines. |
Yes, I'm just opposing the pros and cons of each convention. |
For the moment, for each class I used the common logger if I saw that it was already used in the class, otherwise I used a specific logger. |
8bbeb15
to
1c6ac01
Compare
I originally had an issue where my plugin failed to construct but I had no traces in the log files so I wanted to replace the printStackTrace() with a proper logger. I took the opportunity to do this in several places.