Jedis should use SLF4J instead of Java logging
See original GitHub issueJava Logging in not the industry standard anymore. User should be able to use the logging implementation he wants in order not to end up with several logging configuration files to maintain.
SLF4J provide a facade to the most commons logging formats: log4j, java logging and LogBack.
It also improve performances by having string build when needed Example: java logging
log.fine("Sentinel " + host + ":" + port + " published: " + message + ".");
will always build the string
slf4j
LOG.debug("Sentinel {}:{} published: {}.",host,port,message);
will build the string only if logging level is set to debug.
Issue Analytics
- State:
- Created 8 years ago
- Reactions:3
- Comments:19 (2 by maintainers)
Top Results From Across the Web
Why use SLF4J over Log4J for logging in Java? Example
In this Java article, we will learn why using SLF4J is better than using log4j or java.util.logging. It's been a long time, since...
Read more >SLF4J: 10 Reasons Why You Should Be Using It - Stackify
2. It Supports All the Main Logging Frameworks. SLF4J is just an API, and it knows nothing about the underlying logger that manages...
Read more >SLF4J Error Codes
SLF4J API is designed to bind with one and only one underlying logging framework at a time. If more than one binding is...
Read more >How to correctly use SLF4J or switch to java util logging
I am currently developing/maintaining a java/maven library. Previously I was using a-lot of additional libraries, after removing the not ...
Read more >Introduction to SLF4J - Baeldung
Simple Logging Facade for Java (abbreviated SLF4J) acts as a facade for different logging frameworks (e.g., java.util.logging, logback, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@PatrickSauts Adding a dependency is what we try to avoid since Jedis claims itself as a lightweight library.
Jedis itself barely leaves log message, so I think you can just add jul-to-slf4j as your dependency and choose underlying logging framework to non jdk14. http://www.slf4j.org/legacy.html#jul-to-slf4j
Please give it a try and share the result. Thanks!
@PatrickSauts we try to keep Jedis as plain as possible regarding external dependencies. If you check the code you’ll realize that Jedis have almost no logging at all, and we decided that we’ll try to keep logging as minimal as possible as pretty much everything can be debugged from the redis logs / monitor commands.
If you check the code you’ll realize that there’s no logging at all, so unless we really have the need to support logging, I don’t think we’ll be addressing this soon.