-
-
Notifications
You must be signed in to change notification settings - Fork 440
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
Improve jul sample for easier debugging inside IDE #2058
Conversation
No changelog need here i guess, correct? |
import java.util.logging.Logger; | ||
import org.slf4j.MDC; | ||
|
||
public class Main { | ||
|
||
private static final Logger LOGGER = Logger.getLogger(Main.class.getName()); | ||
|
||
public static void main(String[] args) { | ||
public static void main(String[] args) throws Exception { | ||
LogManager.getLogManager() |
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.
I think there should be a comment that this is made only for the purpose of running it from an IDE.
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.
Added a comment for an alternative way of providing the logging.properties
file.
Codecov Report
@@ Coverage Diff @@
## 6.x.x #2058 +/- ##
========================================
Coverage ? 80.87%
Complexity ? 3176
========================================
Files ? 228
Lines ? 11736
Branches ? 1576
========================================
Hits ? 9492
Misses ? 1655
Partials ? 589 Continue to review full report at Codecov.
|
📜 Description
Improve jul sample for easier debugging inside IDE
💡 Motivation and Context
This way it's easier to start from IDE in debugging mode. Code before didn't use
logging.properties
in that case and handler also wasn't used when starting from IDE.Also replaced logback dependency with slf4j to get access to
MDC
.💚 How did you test it?
locally
📝 Checklist
🔮 Next steps
#skip-changelog