Class TomcatLogger

java.lang.Object
org.apache.juneau.microservice.tomcat.TomcatLogger
All Implemented Interfaces:
org.apache.juli.logging.Log

public class TomcatLogger extends Object implements org.apache.juli.logging.Log
Implementation of the embedded-Tomcat Log façade based on Logger.

Allows Tomcat to log to the Java Util logging framework (and thus to the main log file defined in the [Logging] section), mirroring the role of org.apache.juneau.marshall.microservice.jetty.JettyLogger in the Jetty module.

Tomcat log levels map to Level values as follows: trace→FINEST, debug→FINE, info→INFO, warn→WARNING, and error/fatal→SEVERE.

See Also:
Since:
10.0.0
  • Constructor Details

    • TomcatLogger

      public TomcatLogger()
      Default constructor.

      Returns the logger with name "org.apache.juneau.marshall.microservice.tomcat".

    • TomcatLogger

      public TomcatLogger(String name)
      Normal constructor.
      Parameters:
      name - The logger name. Must not be null.
  • Method Details

    • getName

      public String getName()
      Returns the name of the underlying Java Util logger.
      Returns:
      The logger name.
    • isTraceEnabled

      public boolean isTraceEnabled()
      Specified by:
      isTraceEnabled in interface org.apache.juli.logging.Log
    • isDebugEnabled

      public boolean isDebugEnabled()
      Specified by:
      isDebugEnabled in interface org.apache.juli.logging.Log
    • isInfoEnabled

      public boolean isInfoEnabled()
      Specified by:
      isInfoEnabled in interface org.apache.juli.logging.Log
    • isWarnEnabled

      public boolean isWarnEnabled()
      Specified by:
      isWarnEnabled in interface org.apache.juli.logging.Log
    • isErrorEnabled

      public boolean isErrorEnabled()
      Specified by:
      isErrorEnabled in interface org.apache.juli.logging.Log
    • isFatalEnabled

      public boolean isFatalEnabled()
      Specified by:
      isFatalEnabled in interface org.apache.juli.logging.Log
    • trace

      public void trace(Object message)
      Specified by:
      trace in interface org.apache.juli.logging.Log
    • trace

      public void trace(Object message, Throwable t)
      Specified by:
      trace in interface org.apache.juli.logging.Log
    • debug

      public void debug(Object message)
      Specified by:
      debug in interface org.apache.juli.logging.Log
    • debug

      public void debug(Object message, Throwable t)
      Specified by:
      debug in interface org.apache.juli.logging.Log
    • info

      public void info(Object message)
      Specified by:
      info in interface org.apache.juli.logging.Log
    • info

      public void info(Object message, Throwable t)
      Specified by:
      info in interface org.apache.juli.logging.Log
    • warn

      public void warn(Object message)
      Specified by:
      warn in interface org.apache.juli.logging.Log
    • warn

      public void warn(Object message, Throwable t)
      Specified by:
      warn in interface org.apache.juli.logging.Log
    • error

      public void error(Object message)
      Specified by:
      error in interface org.apache.juli.logging.Log
    • error

      public void error(Object message, Throwable t)
      Specified by:
      error in interface org.apache.juli.logging.Log
    • fatal

      public void fatal(Object message)
      Specified by:
      fatal in interface org.apache.juli.logging.Log
    • fatal

      public void fatal(Object message, Throwable t)
      Specified by:
      fatal in interface org.apache.juli.logging.Log