Packages

object GangLogger

GangLogger is a logger stack tool to store multiple loggers, and iteratively perform the log write action.

GangLogger object can statically execute setLoggerAndConfiguration, killLogger, getLogger, clearLogger2Configuration and etc.

like:

import cn.tellyouwhat.gangsutils.logger.GangLogger
import cn.tellyouwhat.gangsutils.logger.SupportedLogDest.{LOCAL_HTML_LOGGER, PRINTLN_LOGGER}
import cn.tellyouwhat.gangsutils.logger.cc.LoggerConfiguration
import cn.tellyouwhat.gangsutils.logger.dest.fs.LocalHtmlLogger

LocalHtmlLogger.setLogSavePath("logs/ground.html")
GangLogger.setLoggerAndConfiguration(Map(
PRINTLN_LOGGER -> LoggerConfiguration(isDTEnabled = true, isTraceEnabled = true, isHostnameEnabled = true, logPrefix = Some("prefix")),
LOCAL_HTML_LOGGER -> LoggerConfiguration(isDTEnabled = true, isTraceEnabled = true, isHostnameEnabled = true, logPrefix = Some("prefix")),
))
val logger: GangLogger = GangLogger()

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. GangLogger
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

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. def apply(): GangLogger

    if you have not execute setLoggerAndConfiguration, a map of PRINTLN_LOGGER -> LoggerConfiguration will be created with the default values.

    if you have not execute setLoggerAndConfiguration, a map of PRINTLN_LOGGER -> LoggerConfiguration will be created with the default values.

    if you have executed setLoggerAndConfiguration, the specified loggers will be create.

    returns

    the expected GangLogger instance

  5. def apply(isDTEnabled: Boolean = true, isTraceEnabled: Boolean = false, isHostnameEnabled: Boolean = true, logPrefix: Option[String] = None, logLevel: LogLevel.Value = LogLevel.TRACE): GangLogger

    if you fill these parameters without executing setLoggerAndConfiguration, a map of PRINTLN_LOGGER -> LoggerConfiguration will be created with the parameters you filled.

    if you fill these parameters without executing setLoggerAndConfiguration, a map of PRINTLN_LOGGER -> LoggerConfiguration will be created with the parameters you filled.

    if you fill these parameters with setLoggerAndConfiguration executed, the specified loggers will be create.

    isDTEnabled

    is datetime enabled, if setLoggerAndConfiguration has already been executed, this parameter will be ignored

    isTraceEnabled

    is trace enabled, if setLoggerAndConfiguration has already been executed, this parameter will be ignored

    isHostnameEnabled

    is hostname enabled, if setLoggerAndConfiguration has already been executed, this parameter will be ignored

    logPrefix

    option of log prefix string, if setLoggerAndConfiguration has already been executed, this parameter will be ignored

    logLevel

    one of LogLevel log level, if setLoggerAndConfiguration has already been executed, this parameter will be ignored

    returns

    the expected GangLogger instance

  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clearLogger2Configuration(): Unit
  8. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @HotSpotIntrinsicCandidate()
  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  11. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  12. def getLogger: GangLogger

    get GangLogger instance if the underlying _logger is not None or apply a new one if it is

    get GangLogger instance if the underlying _logger is not None or apply a new one if it is

    returns

    the GangLogger instance

  13. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  14. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  15. def killLogger(): Unit

    清除单例 GangLogger 对象

  16. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  18. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  19. def setLoggerAndConfiguration(m: Map[SupportedLogDest.Value, LoggerConfiguration]): Unit

    set the log destination to LoggerConfiguration mappings

    set the log destination to LoggerConfiguration mappings

    m

    the log destination to LoggerConfiguration mappings

  20. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  21. def toString(): String
    Definition Classes
    AnyRef → Any
  22. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  24. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] ) @Deprecated
    Deprecated

Inherited from AnyRef

Inherited from Any

Ungrouped