Skip to content

bug: Dynamic log level configuration fails to parse standard logging aliases (DEBUG, WARN, ERROR, TRACE) #9641

Description

@DhroovSankla

Issue Description

Description

The dynamic logging level service (DynamicLogConfigurationService) periodically checks apicurio.log.level and updates the logger level. However, it parses the level name using standard Java Util Logging (JUL):

Level level = Level.parse(logLevel.toUpperCase(Locale.ROOT));

In standard Java SE, Level.parse() throws an IllegalArgumentException for aliases like DEBUG, WARN, ERROR, or TRACE (as JUL expects FINE, WARNING, SEVERE, FINEST). While this might be masked when JBoss LogManager is globally registered, it fails or crashes with IllegalArgumentException in environments where LogManager is not fully initialized, or in unit/integration tests running outside of JBoss LogManager.

Steps to Reproduce
Call java.util.logging.Level.parse("DEBUG") on a standard JDK environment. It throws: java.lang.IllegalArgumentException: Bad level "DEBUG"

Proposal
Explicitly map JBoss/Quarkus logging aliases (DEBUG, TRACE, WARN, ERROR, FATAL) to standard JUL levels in DynamicLogConfigurationService.java:

TRACE -> Level.FINEST
DEBUG -> Level.FINE
WARN -> Level.WARNING
ERROR / FATAL -> Level.SEVERE

Metadata

Metadata

Assignees

Labels

area/observabilityIssues related to observability such as prometheus metrics or OpenTelemetry.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions