-
Notifications
You must be signed in to change notification settings - Fork 582
4.x: Docs: Add SE logging guide #10137
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
base: main
Are you sure you want to change the base?
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.
I know there might be more text added to the page, but here is one minor typo.
68e093a to
2b1e0c8
Compare
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 are changes that should be made but I'll be out so I am not marking these as "requested" changes to avoid blocking progress on the PR!
2b1e0c8 to
c0d0f8f
Compare
c0d0f8f to
cf49f4f
Compare
cf49f4f to
2073467
Compare
| == Helidon Logging | ||
|
|
||
| Helidon modules use the Java Platform Logging API (`System.Logger`) for logging. Therefore, | ||
| Helidon applications will use Java Util Logging (JUL) as the default log framework. |
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 don't know if it matters but Java calls the java.logging module, which houses the java.util.logging package, the Java Logging API.
| == Customizing Logging with Java Util Logging | ||
|
|
||
| Since by default Helidon uses the Java Util Logging framework, you will see a | ||
| `logging.properties` file in most Helidon examples. It will be similar to this: |
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.
Nit: the usage of logging.properties doesn't follow from the fact that the Java Logging API is used. Obviously people are somewhat familiar with the default logging.properties used by the JVM.
|
|
||
| `HelidonConsoleHandler` is similar to the JUL `ConsoleHandler` with these additional capabilities: | ||
|
|
||
| 1. Defaults the Handler log level to ALL so level filtering is performed only by the Logger |
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.
Handler -> Handler? ALL -> ALL? Logger -> Logger? Or just "logger"? Not sure what the convention you want is
| `HelidonConsoleHandler` is similar to the JUL `ConsoleHandler` with these additional capabilities: | ||
|
|
||
| 1. Defaults the Handler log level to ALL so level filtering is performed only by the Logger | ||
| 2. Uses `HelidonFormatter` which is compatible with JUL `SimpleFormatter` and adds support for MDC tags and the `!thread!` keyword |
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.
Is this the first reference to MDC? If so maybe link to the section somehow
|
|
||
| == log4j and slf4j support | ||
|
|
||
| If you wish to use another log framework, such has log4j or slf4j, and you wish to consolidate Helidon logging |
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.
"consolidate Helidon logging with" -> "route Helidon logs through"?
|
|
||
| === log4j | ||
|
|
||
| To use `log4j` with your Helidon application add the following dependencies: |
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.
…in runtime scope, yes?
|
|
||
| === slf4j | ||
|
|
||
| To use `slf4j` with your Helidon application add the following dependencies: |
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.
…in runtime scope, yes?
Description
Documentation: Add SE logging guide.
See #9744