-
Notifications
You must be signed in to change notification settings - Fork 575
Improve logging by introducing slf4j and logback #501
Improve logging by introducing slf4j and logback #501
Conversation
Codecov Report
@@ Coverage Diff @@
## merge-501 #501 +/- ##
===============================================
+ Coverage 80.27% 80.45% +0.18%
- Complexity 572 578 +6
===============================================
Files 32 32
Lines 2662 2656 -6
Branches 232 232
===============================================
Hits 2137 2137
+ Misses 384 378 -6
Partials 141 141 |
Thanks @dennisgranath for this PR! |
@@ -260,32 +287,7 @@ | |||
</filter> | |||
</filters> | |||
<artifactSet> |
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.
This makes so much sense! I don't know how we overlooked that :) Thanks!
Merging to a protected branch to run CI tests. |
@@ -16,8 +16,7 @@ | |||
# By default we only configure a ConsoleHandler, which will only | |||
# show messages at the INFO and above levels. | |||
#handlers= java.util.logging.ConsoleHandler | |||
handlers= java.util.logging.FileHandler, java.util.logging.ConsoleHandler | |||
|
|||
handlers = org.slf4j.bridge.SLF4JBridgeHandler |
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.
Just one note here. If someone is dependent on that logs are written to a file I think we need to add an optional filehandler in logback.xml.
Description
Change logging from java util logging (jul) to slf4j. Add option to log in jsonFormat with command line argument --logJson. All "native" selenium logs are sent to logback using jul-to-slf4j by setting the SLF4JBridgeHandler (logging_info.properties). In order to that in a smooth way i added the selenium jar into the resulting zalenium.jar.
Motivation and Context
We would like to be able to log in json output and add support for MDC (mapped diagnotic context). Using this approach one could build dashboards in tools like for example kibana.
How Has This Been Tested?
Types of changes
Checklist: