SLF4J VS PMD

Compare SLF4J vs PMD and see what are their differences.

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
SLF4J PMD
23 21
2,257 4,654
1.0% 1.4%
7.8 9.9
13 days ago 7 days ago
Java Java
MIT License GNU General Public License v3.0 or later
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

SLF4J

Posts with mentions or reviews of SLF4J. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-04-21.
  • Slf4j.org TLS Certificate Expired
    1 project | news.ycombinator.com | 17 Jun 2023
  • dazl — a facade for configurable/pluggable Go logging
    2 projects | /r/golang | 21 Apr 2023
    A few years ago, my team moved from Java to Go. Working on Go projects, we encountered a wide variety of logging frameworks with different APIs, configuration, and formatting. We soon found ourselves longing for a logging abstraction layer like Java’s slf4j, which had proven invaluable for use in reusable libraries or configuring and debugging production systems. So, not long after moving to Go, we began working toward replacing what we had lost in slf4j.
  • Fargate logging thru console awslogs or directly to Cloudwatch?
    2 projects | /r/aws | 7 Apr 2023
    I'm not familiar with Serilog as I code mostly in Java, use slf4j (logs to stdout) and our apps send logs to Cloudwatch using the task definition's awslogs configuration. I prefer it this way because I can customize the log configurations in my task definitions. Also the default stream name has this format prefix-name/container-name/ecs-task-id so I can easily identify the logs of the task I want to look at. I haven't experienced any downsides with this approach and our apps publish a shit ton of logs. Cloudwatch approach looks like you can customize the stream name?
  • How does Loggers get multiple parameters in functions
    1 project | /r/javahelp | 4 Apr 2023
    slf4j is open source. You can look at the code.
  • Logging in your API
    13 projects | dev.to | 22 Feb 2023
    Java -> Logback, Log4j2, JDK (Java Util Logging), Slf4j, e.t.c.
  • Primeiros passos no desenvolvimento Java em 2023: um guia particular
    13 projects | dev.to | 19 Jan 2023
    slf4j para padronização dos logs;
  • What are some of the biggest problems you personally face in Java?
    6 projects | /r/java | 27 Dec 2022
  • must known frameworks/libs/tech, every senior java developer must know(?)
    6 projects | /r/java | 9 Dec 2022
    SLF4J
  • Go standard library: structured, leveled logging
    11 projects | news.ycombinator.com | 11 Sep 2022
    > My God. Logging in protobuf?

    Yes, or any other data format and/or transport protocol.

    I'm surprised this is up for debate.

    > Logging is the lowest of all debugging utilities - its the first thing you ever do writing software - “hello world”. And, while I admire structural logging, the truth is printing strings remains (truly) the lowest common denominator across software developers.

    This sort of comment is terribly miopic. You can have a logging API, and then configure your logging to transport the events anywhere, any way. This is a terribly basic feature and requirement, and one that comes out of the box with some systems. Check how SLF4J[1] is pervasive in Java, and how any SLF4J implementation offers logging to stdout or a local file as a very specific and basic usecase.

    It turns out that nowadays most developers write software that runs on many computers that aren't stashed over or under their desks, and thus they need efficient and convenient ways to check what's happening either in a node or in all deployments.

    [1] https://www.slf4j.org/

  • Logback en Springboot
    1 project | /r/CharruaDevs | 3 Aug 2022

PMD

Posts with mentions or reviews of PMD. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-08-01.
  • PMD 7 Is Here
    1 project | news.ycombinator.com | 22 Mar 2024
  • Amazon CodeGuru Reviewer: already time for retirement?
    2 projects | dev.to | 1 Aug 2023
    While the security findings can be pretty elaborate and helpful, the code quality and performance focused findings are not that impressive and can often be detected by more basic or powerful tools like SonarQube (paying) or PMD (free). To see what I mean you can have a look at the list of Java code quality detectors, which is pretty short and contains a lot of simple findings like:
  • Code Review for Flows
    1 project | /r/salesforce | 28 Apr 2023
    Also saw this convo has a couple years worth of ideas going on … https://github.com/pmd/pmd/issues/3413
  • Custom Gradle Plugin for Unified Static Code Analysis
    3 projects | dev.to | 4 Feb 2023
    PMD and Checkstyle are static analysis tools that check your code on each project build. Gradle allows to apply them easily.
  • Spring Boot – Black Box Testing
    9 projects | dev.to | 13 Nov 2022
    The generated classes should be put into .gitignore. Otherwise, if you have Checkstyle, PMD, or SonarQube in your project, then generated classes can violate some rules. Besides, if you don't put them into .gitignore, then each pull request might become huge due to the fact that even a slightest fix can lead to lots of changes in the generated classes.
  • After Java tutorials, now what???
    5 projects | /r/javahelp | 30 Apr 2022
    - PMD Static Code Analysis tool: https://pmd.github.io/
  • Ask HN: What is a modern Java environment?
    22 projects | news.ycombinator.com | 29 Mar 2022
    PMD, Spotbugs, Nullaway: Java linting/static analysis (https://pmd.github.io, https://spotbugs.github.io, https://github.com/uber/NullAway)
  • Code smell plugin
    2 projects | /r/javahelp | 15 Feb 2022
    PMD, and checkstyle as well.
  • Writing Clean and Consistent Code with Static Analysis using PMD and Apex
    6 projects | dev.to | 28 Jan 2022
    Open up the config/ruleset.xml file, and you’ll find an XML document that lists several rules. These rules map to the issues which PMD will report on. Believe it or not, there are hundreds of Apex rules, and you can find the full set at the PMD repo. You have complete control over which rules to enable. Typically, you’d determine which ones are important by agreeing with your teammates on the ones that matter most. After all, their code will be statically analyzed, too!
  • Is there a tool to track CVEs for the software that we use?
    8 projects | /r/sysadmin | 14 Dec 2021
    While at it you could also point them to static code analyzers such as error_prone, spotbugs and pmd (use all 3 at once - they complement each other in detecting different issues).

What are some alternatives?

When comparing SLF4J and PMD you can also consider the following projects:

Apache Log4j 2 - Apache Log4j 2 is a versatile, feature-rich, efficient logging API and backend for Java.

Spotbugs - SpotBugs is FindBugs' successor. A tool for static analysis to look for bugs in Java code.

Logbook - An extensible Java library for HTTP request and response logging

SonarQube - Continuous Inspection

tinylog - tinylog is a lightweight logging framework for Java, Kotlin, Scala, and Android

Error Prone - Catch common Java mistakes as compile-time errors

kibana - Your window into the Elastic Stack

Checkstyle - Checkstyle is a development tool to help programmers write Java code that adheres to a coding standard. By default it supports the Google Java Style Guide and Sun Code Conventions, but is highly configurable. It can be invoked with an ANT task and a command line program.

graylog - Free and open log management

infer - A static analyzer for Java, C, C++, and Objective-C

Logback - The reliable, generic, fast and flexible logging framework for Java.

SonarJava - :coffee: SonarSource Static Analyzer for Java Code Quality and Security