Package 

Class LoggerExtensionsKt

    • Method Summary

      Modifier and Type Method Description
      final static <T extends Any> Logger createLogger(T $self, Level minLogLevel, LogContext logContext) Create a logger with an optional minLogLevel and logContext using the fully-qualified name of the actual class (i.e.
      final static <T extends Any> Logger createChildLogger(T $self, Logger parentLogger, Map<String, String> childContext) Create a child logger from parentLogger with any optional childContext using the fully-qualified name of the actual class (i.e.
      final static <T extends Any> Class<?> getClassForLogging(Class<T> javaClass) Given a Class, get the proper class to be used for the name of a logger by stripping any companion object class identifier, if present.
      final static Unit cinfo(Logger $self, Function0<String> msg) Note that, although the logger now supports taking a message supplier argument, these methods are still more efficient as they're inline (and therefore don't require constructing a lambda object)
      final static Unit cdebug(Logger $self, Function0<String> msg)
      final static Unit cwarn(Logger $self, Function0<String> msg)
      final static Unit cerror(Logger $self, Function0<String> msg)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • createLogger

         final static <T extends Any> Logger createLogger(T $self, Level minLogLevel, LogContext logContext)

        Create a logger with an optional minLogLevel and logContext using the fully-qualified name of the actual class (i.e. the instance's class, not the class that happens to be calling this method).

      • createChildLogger

         final static <T extends Any> Logger createChildLogger(T $self, Logger parentLogger, Map<String, String> childContext)

        Create a child logger from parentLogger with any optional childContext using the fully-qualified name of the actual class (i.e. the instance's class, not the class that happens to be calling this method).

      • getClassForLogging

         final static <T extends Any> Class<?> getClassForLogging(Class<T> javaClass)

        Given a Class, get the proper class to be used for the name of a logger by stripping any companion object class identifier, if present.

      • cinfo

         final static Unit cinfo(Logger $self, Function0<String> msg)

        Note that, although the logger now supports taking a message supplier argument, these methods are still more efficient as they're inline (and therefore don't require constructing a lambda object)