[logback-dev] [JIRA] Updates for LOGBACK-1578: Unable to use LevelChangePropagator in a modular application

QOS.CH (JIRA) noreply-jira at qos.ch
Wed Sep 22 21:33:00 CEST 2021


logback / LOGBACK-1578 [Open]
Unable to use LevelChangePropagator in a modular application

==============================

Here's what changed in this issue in the last few minutes.
This issue has been created
This issue is now assigned to you.

View or comment on issue using this link
https://jira.qos.ch/browse/LOGBACK-1578

==============================
 Issue created
------------------------------

Iiro Nykänen created this issue on 22/Sep/21 9:19 PM
Summary:              Unable to use LevelChangePropagator in a modular application
Issue Type:           Bug
Affects Versions:     1.3.0-alpha10
Assignee:             Logback dev list
Components:           logback-classic
Created:              22/Sep/21 9:19 PM
Environment:          JDK16
Priority:             Major
Reporter:             Iiro Nykänen
Description:
  Using LevelChangePropagator in Logback configuration causes the following exception in a modular application:
  {noformat}
  Exception in thread "main" java.lang.IllegalAccessError: class ch.qos.logback.classic.jul.LevelChangePropagator (in module ch.qos.logback.classic) cannot access class java.util.logging.LogManager (in module java.logging) because module ch.qos.logback.classic does not read module java.logging
  {noformat}
  
  I'm not sure how the multi-release system works exactly, but the java.logging module is not present currently in the [module-info|https://github.com/qos-ch/logback/blob/d7deb965489591bfa86ceb87897cd7d799f419ea/logback-classic/src/main/java9/module-info.java] file. As it only makes sense to require the module if the LevelChangePropagator is used (as far as I know, I don't believe the core of Logback Classic would require java.logging?), I'd imagine adding a *requires static java.logging* statement should be enough.
  
  There is an open [pull request|https://github.com/qos-ch/logback/pull/501] for this issue, but it features a plain requires statement which forces the requirement for all users whether they need it or not.


==============================
 This message was sent by Atlassian Jira (v8.8.0#808000-sha1:e2c7e59)



More information about the logback-dev mailing list