1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[JBoss] Enable JBoss Logging TRACE for Qaurkus

Discussão em 'StackOverflow' iniciado por Stack, Junho 19, 2025.

  1. Stack

    Stack Membro Participativo

    I'm using Jboss Logging Message for a log test service in Quarkus.

    This is my predefined interface:

    @MessageLogger(projectCode = "my-logging")
    public interface LoggingTestServiceLogger extends BasicLogger {
    LoggingTestServiceLogger ltsLogger = Logger.getMessageLogger(LoggingTestServiceLogger.class, LoggingTestServiceLogger.class.getPackageName());

    @LogMessage(level = TRACE)
    @Message(id = 1001, value = "Received requested loglevel TRACE.")
    void loggingTestLevelTrace();

    .......


    And a simple Service class:

    @Override
    public void defineLogLevel(String logLevel) throws LoggingBusinessServicesException {
    switch (logLevel.toUpperCase()) {
    case "TRACE" -> LoggingTestServiceLogger.ltsLogger.loggingTestLevelTrace();
    case "DEBUG" -> LoggingTestServiceLogger.ltsLogger.loggingTestLevelDebug();
    case "INFO" -> LoggingTestServiceLogger.ltsLogger.loggingTestLevelInfo();
    case "WARN" -> LoggingTestServiceLogger.ltsLogger.loggingTestLevelWarn();
    case "ERROR" -> LoggingTestServiceLogger.ltsLogger.loggingTestLevelError();
    case "FATAL" -> LoggingTestServiceLogger.ltsLogger.loggingTestLevelFatal();
    default -> LoggingTestServiceLogger.ltsLogger.error("Invalid loglevel.");
    }
    }


    Note: All of the others are working fine, except TRACE (goal is the console).

    application.properties:

    quarkus.log.category."root.to.my.logging".level=TRACE


    LoggingTestServiceLogger.ltsLogger.isTraceEnabled() is yields false.

    Note: The requirement is to activate trace for the logger from the .properties file, not from code.

    Continue reading...

Compartilhe esta Página