io.vertx.core.logging

## Class Logger

- java.lang.Object
- - io.vertx.core.logging.Logger

-     public class Logger
      extends Object

  This class allows us to isolate all our logging dependencies in one place. It also allows us to have zero runtime 3rd party logging jar dependencies, since we default to JUL by default.

  By default logging will occur using JUL (Java-Util-Logging). The logging configuration file (logging.properties) used by JUL will taken from the default logging.properties in the JDK installation if no `java.util.logging.config.file` system property is set.

  If you would prefer to use Log4J or SLF4J instead of JUL then you can set a system property called `vertx.logger-delegate-factory-class-name` to the class name of the delegate for your logging system. For Log4J the value is `io.vertx.core.logging.Log4jLogDelegateFactory`, for SLF4J the value is `io.vertx.core.logging.SLF4JLogDelegateFactory`. You will need to ensure whatever jar files required by your favourite log framework are on your classpath.

  Keep in mind that logging backends use different formats to represent replaceable tokens in parameterized messages. As a consequence, if you rely on parameterized logging methods, you won't be able to switch backends without changing your code.

  Author:
    Tim Fox

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Logger(LogDelegate delegate)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `debug(Object message)`
    `void` | `debug(Object message, Object... objects)`
    `void` | `debug(Object message, Throwable t)`
    `void` | `debug(Object message, Throwable t, Object... objects)`
    `void` | `error(Object message)`
    `void` | `error(Object message, Object... objects)`
    `void` | `error(Object message, Throwable t)`
    `void` | `error(Object message, Throwable t, Object... objects)`
    `void` | `fatal(Object message)`
    `void` | `fatal(Object message, Throwable t)`
    `LogDelegate` | `getDelegate()`
    `void` | `info(Object message)`
    `void` | `info(Object message, Object... objects)`
    `void` | `info(Object message, Throwable t)`
    `void` | `info(Object message, Throwable t, Object... objects)`
    `boolean` | `isDebugEnabled()`
    `boolean` | `isInfoEnabled()`
    `boolean` | `isTraceEnabled()`
    `boolean` | `isWarnEnabled()`
    `void` | `trace(Object message)`
    `void` | `trace(Object message, Object... objects)`
    `void` | `trace(Object message, Throwable t)`
    `void` | `trace(Object message, Throwable t, Object... objects)`
    `void` | `warn(Object message)`
    `void` | `warn(Object message, Object... objects)`
    `void` | `warn(Object message, Throwable t)`
    `void` | `warn(Object message, Throwable t, Object... objects)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Logger

          public Logger(LogDelegate delegate)

  - ### Method Detail

    - #### isWarnEnabled

          public boolean isWarnEnabled()

    - #### isInfoEnabled

          public boolean isInfoEnabled()

    - #### isDebugEnabled

          public boolean isDebugEnabled()

    - #### isTraceEnabled

          public boolean isTraceEnabled()

    - #### fatal

          public void fatal(Object message)

    - #### fatal

          public void fatal(Object message,
                            Throwable t)

    - #### error

          public void error(Object message)

    - #### error

          public void error(Object message,
                            Throwable t)

    - #### error

          public void error(Object message,
                            Object... objects)

      Throws:
        `UnsupportedOperationException` - if the logging backend does not support parameterized messages

    - #### error

          public void error(Object message,
                            Throwable t,
                            Object... objects)

      Throws:
        `UnsupportedOperationException` - if the logging backend does not support parameterized messages

    - #### warn

          public void warn(Object message)

    - #### warn

          public void warn(Object message,
                           Throwable t)

    - #### warn

          public void warn(Object message,
                           Object... objects)

      Throws:
        `UnsupportedOperationException` - if the logging backend does not support parameterized messages

    - #### warn

          public void warn(Object message,
                           Throwable t,
                           Object... objects)

      Throws:
        `UnsupportedOperationException` - if the logging backend does not support parameterized messages

    - #### info

          public void info(Object message)

    - #### info

          public void info(Object message,
                           Throwable t)

    - #### info

          public void info(Object message,
                           Object... objects)

      Throws:
        `UnsupportedOperationException` - if the logging backend does not support parameterized messages

    - #### info

          public void info(Object message,
                           Throwable t,
                           Object... objects)

      Throws:
        `UnsupportedOperationException` - if the logging backend does not support parameterized messages

    - #### debug

          public void debug(Object message)

    - #### debug

          public void debug(Object message,
                            Throwable t)

    - #### debug

          public void debug(Object message,
                            Object... objects)

      Throws:
        `UnsupportedOperationException` - if the logging backend does not support parameterized messages

    - #### debug

          public void debug(Object message,
                            Throwable t,
                            Object... objects)

      Throws:
        `UnsupportedOperationException` - if the logging backend does not support parameterized messages

    - #### trace

          public void trace(Object message)

    - #### trace

          public void trace(Object message,
                            Throwable t)

    - #### trace

          public void trace(Object message,
                            Object... objects)

      Throws:
        `UnsupportedOperationException` - if the logging backend does not support parameterized messages

    - #### trace

          public void trace(Object message,
                            Throwable t,
                            Object... objects)

      Throws:
        `UnsupportedOperationException` - if the logging backend does not support parameterized messages

    - #### getDelegate

          public LogDelegate getDelegate()

      Returns:
        the delegate instance sending operations to the underlying logging framework

Copyright © 2021 Eclipse. All rights reserved.