[Maintenance]: Migrate from Log4j 2 to SLF4J + Logback

Open
#5,989 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Quiet
Tech stack
java
Domain
backend

Research direction

Start by reading LogFunctions.java and JTextAreaAppender.java, which the issue identifies as the highest- and medium-risk parts of the migration. Review how the current logging setup uses Log4j 2 Core and how the appender is registered before estimating the broader import and dependency changes. Done means the logging code and named dependencies use SLF4J + Logback, Log4j 2 is removed, and the macro functions are carefully tested.

Written by the indexing model from the issue text.

Description

code-maintenance
Describe the problem

Some corporate security scanners flag any version of log4j-core*.jar by name, regardless of patch level. Removing Log4j 2 entirely eliminates the false positive.

The improvement you'd like to see

Migrate the current logging code to SLF4J + Logback

Expected Benefits

No more false positives for security scanners that have flagged all Log4j 2 libraries as critical security issues, regardless of patch level.
SLF4J provides a facade allowing us to swap the logging implementation in the future if we desire,

Additional Context

Risks

High Risk - LogFunctions.java uses advanced Log4j 2 Core API that has no direct SLF4J equivalent — requires Logback-specific API and careful testing of macro functions.
Medium Risk - JTextAreaAppender.java needs to be reimplemented as a Logback appender with a different discovery/registration mechanism.
Low Risk The bulk, approx. 190 file import changes are import-only and can be validated by the compiler.

com.github.RPTools:advanced-dice-roller will need to change its logger to SLF4J (low risk)
com.github.RPTools:upnplib will need to change its logger to SLF4J (low risk)
Replace sentry-log4j with sentry-logback

Dominant language
Java
Stars
927
Forks
286
Avg merge
3d 17h
Merged PRs (30d)
94

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from RPTools/maptool

All issues in RPTools/maptool

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.