All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.bitcoins.db.DatabaseLogger.scala Maven / Gradle / Ivy

There is a newer version: 1.9.3
Show newest version
package org.bitcoins.db

/** Exposes access to the database interaction logger */
private[bitcoins] trait DatabaseLogger {
  private var _logger: MarkedLogger = _
  protected[bitcoins] def logger(implicit config: AppConfig) = {
    if (_logger == null) {
      _logger = DatabaseLoggerImpl(config).getLogger
    }
    _logger
  }
}

private[db] case class DatabaseLoggerImpl(override val conf: AppConfig)
    extends AppLoggers {

  /**
    * @return the database interaction logger
    */
  def getLogger: MarkedLogger =
    getLoggerImpl(LoggerKind.Database)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy