You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 16, 2021. It is now read-only.
In java.util.logging, the caller source class and method only exists when you use the Log.logp() style methods (which is in rare form).
The logger name should never be excluded is often more useful then the caller class + method (and wont confuse people attempting to configure logging levels)
The "message" entry also has the throwable appended onto the end of it, which in the case of multi-line throwable messages can be difficult to understand where the logging message ends and the exception message begins.
I propose the following changes:
keep "severity" (possible values "TRACE", "DEBUG", "INFO", "WARN", "ERROR". as this is the common overlap in all of the logging frameworks)
keep "timestamp" as-is, but based on logging event time
keep "thread" but base it on the thread at the time of the logging event creation
keep "message" but it is ONLY the formatted/parsed message for the log event
new (required) "logger" which is the logger name
new (optional) "caller" entry which is a string which has the class + method + extra
new (optional) "throwable" entry which has the entire stacktrace, sans duplicate stacktrace elements
optional "traceId" is always in top level (and obtained from MDC)
all other MDC entries are in a new "mdc" sub-object
This will make the json compatible with more then java.util.logging events, and can be populated with events from log4j, commons-logging, java.util.logging, slf4j, logback, logkit, osgi, and apache-juli.
Note: the "throwable" section can be formatted to suite the Cloud Debugger team in any fashion they want. The "caller" entry is often exposed by other (not java.uitil.logging) logging frameworks as a full call stack, not just a single class + method (we can expose this stack if they deem it useful, or just default to the first entry)
The text was updated successfully, but these errors were encountered:
The effort to modernize the logging layer is being scaled back (result of some discussions), as it will cause other issues in the compat layer. I'm considering this closed.
How flexible are we in altering the JSON that the Cloud Debugger uses?
The current format being produced loses information (bad java.util.logging assumptions / faults).
Some concerns:
Thread.currentThread()
at time of logging, not when the logging event was createdAn example output as it exists now ...
In java.util.logging, the caller source class and method only exists when you use the
Log.logp()
style methods (which is in rare form).The logger name should never be excluded is often more useful then the caller class + method (and wont confuse people attempting to configure logging levels)
The "message" entry also has the throwable appended onto the end of it, which in the case of multi-line throwable messages can be difficult to understand where the logging message ends and the exception message begins.
I propose the following changes:
This will make the json compatible with more then java.util.logging events, and can be populated with events from log4j, commons-logging, java.util.logging, slf4j, logback, logkit, osgi, and apache-juli.
The text was updated successfully, but these errors were encountered: