Packages

o

com.twitter.util.logging

Slf4jBridgeUtility

object Slf4jBridgeUtility extends Logging

A utility to safely install the slf4j-api SLF4JBridgeHandler. The utility attempts to detect if the slf4j-jdk14 dependency is present on the classpath as it is unwise to install the jul-to-slf4j bridge with the slf4j-jdk14 dependency present as it may cause an infinite loop.

If the SLF4JBridgeHandler is already installed we do not try to install it again.

Additionally note there is a performance impact for bridging jul log messages in this manner. However, using the Logback LevelChangePropagator (> 0.9.25) can eliminate this performance impact.

See also

org.slf4j.bridge.SLF4JBridgeHandler

Bridging legacy APIs

SLF4J: jul-to-slf4j bridge

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Slf4jBridgeUtility
  2. Logging
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def attemptSlf4jBridgeHandlerInstallation(): Unit

    Attempt installation of the slf4j-api SLF4JBridgeHandler.

    Attempt installation of the slf4j-api SLF4JBridgeHandler. The SLF4JBridgeHandler will not be installed if already installed or if the slf4j-jdk14 dependency is detected on the classpath.

  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  7. def debug(marker: Marker, message: => Any, cause: Throwable): Unit

    Logs the given message at the named log level with the underlying logger taking into consideration the given org.slf4j.Marker data.

    Logs the given message at the named log level with the underlying logger taking into consideration the given org.slf4j.Marker data.

    Attributes
    protected[this]
    Definition Classes
    Logging
  8. def debug(message: => Any, cause: Throwable): Unit

    Logs the given message at the named log level using call-by-name for the message parameter with the underlying logger.

    Logs the given message at the named log level using call-by-name for the message parameter with the underlying logger.

    Attributes
    protected[this]
    Definition Classes
    Logging
  9. def debug(marker: Marker, message: => Any): Unit

    Logs the given message at the named log level with the underlying logger taking into consideration the given org.slf4j.Marker data.

    Logs the given message at the named log level with the underlying logger taking into consideration the given org.slf4j.Marker data.

    Attributes
    protected[this]
    Definition Classes
    Logging
  10. def debug(message: => Any): Unit

    Logs the given message at the named log level using call-by-name for the message parameter with the underlying logger.

    Logs the given message at the named log level using call-by-name for the message parameter with the underlying logger.

    Attributes
    protected[this]
    Definition Classes
    Logging
  11. def debugResult[T](message: => String)(fn: => T): T

    Log the given message at the named log level formatted with the result of the passed in function using the underlying logger.

    Log the given message at the named log level formatted with the result of the passed in function using the underlying logger. The incoming string message should contain a single %s which will be replaced with the result[T] of the given function.

    Example:

    infoResult("The answer is: %s") {"42"}
    Attributes
    protected[this]
    Definition Classes
    Logging
  12. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  14. def error(marker: Marker, message: => Any, cause: Throwable): Unit

    Logs the given message at the named log level with the underlying logger taking into consideration the given org.slf4j.Marker data.

    Logs the given message at the named log level with the underlying logger taking into consideration the given org.slf4j.Marker data.

    Attributes
    protected[this]
    Definition Classes
    Logging
  15. def error(message: => Any, cause: Throwable): Unit

    Logs the given message at the named log level using call-by-name for the message parameter with the underlying logger.

    Logs the given message at the named log level using call-by-name for the message parameter with the underlying logger.

    Attributes
    protected[this]
    Definition Classes
    Logging
  16. def error(marker: Marker, message: => Any): Unit

    Logs the given message at the named log level with the underlying logger taking into consideration the given org.slf4j.Marker data.

    Logs the given message at the named log level with the underlying logger taking into consideration the given org.slf4j.Marker data.

    Attributes
    protected[this]
    Definition Classes
    Logging
  17. def error(message: => Any): Unit

    Logs the given message at the named log level using call-by-name for the message parameter with the underlying logger.

    Logs the given message at the named log level using call-by-name for the message parameter with the underlying logger.

    Attributes
    protected[this]
    Definition Classes
    Logging
  18. def errorResult[T](message: => String)(fn: => T): T

    Log the given message at the named log level formatted with the result of the passed in function using the underlying logger.

    Log the given message at the named log level formatted with the result of the passed in function using the underlying logger. The incoming string message should contain a single %s which will be replaced with the result[T] of the given function.

    Example:

    infoResult("The answer is: %s") {"42"}
    Attributes
    protected[this]
    Definition Classes
    Logging
  19. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  20. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  21. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  22. def info(marker: Marker, message: => Any, cause: Throwable): Unit

    Logs the given message at the named log level with the underlying logger taking into consideration the given org.slf4j.Marker data.

    Logs the given message at the named log level with the underlying logger taking into consideration the given org.slf4j.Marker data.

    Attributes
    protected[this]
    Definition Classes
    Logging
  23. def info(message: => Any, cause: Throwable): Unit

    Logs the given message at the named log level using call-by-name for the message parameter with the underlying logger.

    Logs the given message at the named log level using call-by-name for the message parameter with the underlying logger.

    Attributes
    protected[this]
    Definition Classes
    Logging
  24. def info(marker: Marker, message: => Any): Unit

    Logs the given message at the named log level with the underlying logger taking into consideration the given org.slf4j.Marker data.

    Logs the given message at the named log level with the underlying logger taking into consideration the given org.slf4j.Marker data.

    Attributes
    protected[this]
    Definition Classes
    Logging
  25. def info(message: => Any): Unit

    Logs the given message at the named log level using call-by-name for the message parameter with the underlying logger.

    Logs the given message at the named log level using call-by-name for the message parameter with the underlying logger.

    Attributes
    protected[this]
    Definition Classes
    Logging
  26. def infoResult[T](message: => String)(fn: => T): T

    Log the given message at the named log level formatted with the result of the passed in function using the underlying logger.

    Log the given message at the named log level formatted with the result of the passed in function using the underlying logger. The incoming string message should contain a single %s which will be replaced with the result[T] of the given function.

    Example:

    infoResult("The answer is: %s") {"42"}
    Attributes
    protected[this]
    Definition Classes
    Logging
  27. def isDebugEnabled(marker: Marker): Boolean

    Determines if the named log level is enabled on the underlying logger taking into consideration the given org.slf4j.Marker data.

    Determines if the named log level is enabled on the underlying logger taking into consideration the given org.slf4j.Marker data. Returns true if enabled, false otherwise.

    Attributes
    protected[this]
    Definition Classes
    Logging
  28. def isDebugEnabled: Boolean

    Determines if the named log level is enabled on the underlying logger.

    Determines if the named log level is enabled on the underlying logger. Returns true if enabled, false otherwise.

    Attributes
    protected[this]
    Definition Classes
    Logging
  29. def isErrorEnabled(marker: Marker): Boolean

    Determines if the named log level is enabled on the underlying logger taking into consideration the given org.slf4j.Marker data.

    Determines if the named log level is enabled on the underlying logger taking into consideration the given org.slf4j.Marker data. Returns true if enabled, false otherwise.

    Attributes
    protected[this]
    Definition Classes
    Logging
  30. def isErrorEnabled: Boolean

    Determines if the named log level is enabled on the underlying logger.

    Determines if the named log level is enabled on the underlying logger. Returns true if enabled, false otherwise.

    Attributes
    protected[this]
    Definition Classes
    Logging
  31. def isInfoEnabled(marker: Marker): Boolean

    Determines if the named log level is enabled on the underlying logger taking into consideration the given org.slf4j.Marker data.

    Determines if the named log level is enabled on the underlying logger taking into consideration the given org.slf4j.Marker data. Returns true if enabled, false otherwise.

    Attributes
    protected[this]
    Definition Classes
    Logging
  32. def isInfoEnabled: Boolean

    Determines if the named log level is enabled on the underlying logger.

    Determines if the named log level is enabled on the underlying logger. Returns true if enabled, false otherwise.

    Attributes
    protected[this]
    Definition Classes
    Logging
  33. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  34. def isTraceEnabled(marker: Marker): Boolean

    Determines if the named log level is enabled on the underlying logger taking into consideration the given org.slf4j.Marker data.

    Determines if the named log level is enabled on the underlying logger taking into consideration the given org.slf4j.Marker data. Returns true if enabled, false otherwise.

    Attributes
    protected[this]
    Definition Classes
    Logging
  35. def isTraceEnabled: Boolean

    Determines if the named log level is enabled on the underlying logger.

    Determines if the named log level is enabled on the underlying logger. Returns true if enabled, false otherwise.

    Attributes
    protected[this]
    Definition Classes
    Logging
  36. def isWarnEnabled(marker: Marker): Boolean

    Determines if the named log level is enabled on the underlying logger taking into consideration the given org.slf4j.Marker data.

    Determines if the named log level is enabled on the underlying logger taking into consideration the given org.slf4j.Marker data. Returns true if enabled, false otherwise.

    Attributes
    protected[this]
    Definition Classes
    Logging
  37. def isWarnEnabled: Boolean

    Determines if the named log level is enabled on the underlying logger.

    Determines if the named log level is enabled on the underlying logger. Returns true if enabled, false otherwise.

    Attributes
    protected[this]
    Definition Classes
    Logging
  38. final def logger: Logger

    Return the underlying com.twitter.util.logging.Logger

    Return the underlying com.twitter.util.logging.Logger

    returns

    a com.twitter.util.logging.Logger

    Attributes
    protected[this]
    Definition Classes
    Logging
  39. final def loggerName: String

    Return the name of the underlying com.twitter.util.logging.Logger

    Return the name of the underlying com.twitter.util.logging.Logger

    returns

    a String name

    Attributes
    protected[this]
    Definition Classes
    Logging
  40. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  41. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  42. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  43. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  44. def toString(): String
    Definition Classes
    AnyRef → Any
  45. def trace(marker: Marker, message: => Any, cause: Throwable): Unit

    Logs the given message at the named log level with the underlying logger taking into consideration the given org.slf4j.Marker data.

    Logs the given message at the named log level with the underlying logger taking into consideration the given org.slf4j.Marker data.

    Attributes
    protected[this]
    Definition Classes
    Logging
  46. def trace(message: => Any, cause: Throwable): Unit

    Logs the given message at the named log level using call-by-name for the message parameter with the underlying logger.

    Logs the given message at the named log level using call-by-name for the message parameter with the underlying logger.

    Attributes
    protected[this]
    Definition Classes
    Logging
  47. def trace(marker: Marker, message: => Any): Unit

    Logs the given message at the named log level with the underlying logger taking into consideration the given org.slf4j.Marker data.

    Logs the given message at the named log level with the underlying logger taking into consideration the given org.slf4j.Marker data.

    Attributes
    protected[this]
    Definition Classes
    Logging
  48. def trace(message: => Any): Unit

    Logs the given message at the named log level using call-by-name for the message parameter with the underlying logger.

    Logs the given message at the named log level using call-by-name for the message parameter with the underlying logger.

    Attributes
    protected[this]
    Definition Classes
    Logging
  49. def traceResult[T](message: => String)(fn: => T): T

    Log the given message at the named log level formatted with the result of the passed in function using the underlying logger.

    Log the given message at the named log level formatted with the result of the passed in function using the underlying logger. The incoming string message should contain a single %s which will be replaced with the result[T] of the given function.

    Example:

    infoResult("The answer is: %s") {"42"}
    Attributes
    protected[this]
    Definition Classes
    Logging
  50. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  51. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  52. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  53. def warn(marker: Marker, message: => Any, cause: Throwable): Unit

    Logs the given message at the named log level with the underlying logger taking into consideration the given org.slf4j.Marker data.

    Logs the given message at the named log level with the underlying logger taking into consideration the given org.slf4j.Marker data.

    Attributes
    protected[this]
    Definition Classes
    Logging
  54. def warn(message: => Any, cause: Throwable): Unit

    Logs the given message at the named log level using call-by-name for the message parameter with the underlying logger.

    Logs the given message at the named log level using call-by-name for the message parameter with the underlying logger.

    Attributes
    protected[this]
    Definition Classes
    Logging
  55. def warn(marker: Marker, message: => Any): Unit

    Logs the given message at the named log level with the underlying logger taking into consideration the given org.slf4j.Marker data.

    Logs the given message at the named log level with the underlying logger taking into consideration the given org.slf4j.Marker data.

    Attributes
    protected[this]
    Definition Classes
    Logging
  56. def warn(message: => Any): Unit

    Logs the given message at the named log level using call-by-name for the message parameter with the underlying logger.

    Logs the given message at the named log level using call-by-name for the message parameter with the underlying logger.

    Attributes
    protected[this]
    Definition Classes
    Logging
  57. def warnResult[T](message: => String)(fn: => T): T

    Log the given message at the named log level formatted with the result of the passed in function using the underlying logger.

    Log the given message at the named log level formatted with the result of the passed in function using the underlying logger. The incoming string message should contain a single %s which will be replaced with the result[T] of the given function.

    Example:

    infoResult("The answer is: %s") {"42"}
    Attributes
    protected[this]
    Definition Classes
    Logging

Inherited from Logging

Inherited from AnyRef

Inherited from Any

Ungrouped