object LoggingHelper extends LoggingHelper
Log File Related Helpers
This object just provides a variety of utilities for manipulating LogBack programatically.
- Alphabetic
- By Inheritance
- LoggingHelper
- LoggingHelper
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
- implicit class ScalaLoggerExtension extends AnyRef
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val FILE_APPENDER_NAME: String
- val PAGE_APPENDER_NAME: String
- val STDOUT_APPENDER_NAME: String
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
configureLogger(logger: Logger): Unit
Set the logger's level per requested patterns
- def convertRecentEventsToHtml(): String
-
def
createLoggerName: String
- Attributes
- protected
- Definition Classes
- LoggingHelper
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
- def findLogger(name: String): Option[Logger]
-
def
findLoggers(pattern: String): Seq[Logger]
Find loggers matching a pattern
Find loggers matching a pattern
- pattern
A Scala regular expression string for the names of the loggers to match
- returns
A sequence of the matching loggers
-
def
forgetLoggingLevels(): Unit
Clear the remembered patterns Patterns set with the forFuture flag set to true are remembers for subsequent loggers.
Clear the remembered patterns Patterns set with the forFuture flag set to true are remembers for subsequent loggers. This call causes all such remembered patterns to be forgotten. No existing loggers are affected.
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- def getLoggingConfig: List[(String, String)]
- def getLoggingLevel(name: String): Level
- def getLoggingTableData: (Iterable[String], Iterable[Iterable[String]])
-
def
hasAppenders(logger: Logger): Boolean
Determine if a logger has an appender or not
Determine if a logger has an appender or not
- logger
The logger to check
- returns
true iff the logger has an appender
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
level: Level
- Definition Classes
- LoggingHelper
- val levelPatterns: Map[Regex, Level]
-
lazy val
log: Logger
- Attributes
- protected
- Definition Classes
- LoggingHelper
-
def
loggerName: String
- Definition Classes
- LoggingHelper
- def makeRollingFileAppender(file: File, maxFiles: Int, maxFileSizeInMB: Int, immediateFlush: Boolean, name: String): RollingFileAppender[ILoggingEvent]
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- val nullValue: Null
- var pageAppender: Option[CyclicBufferAppender[ILoggingEvent]]
- def removeAppender(name: String): Unit
-
val
rootLogger: Logger
Easy access to the root logger
-
def
rootLoggerContext: Option[LoggerContext]
Easy access to the logger context
- def setFileAppender(file: File, maxFiles: Int, maxFileSizeInMB: Int, immediateFlush: Boolean, name: String = FILE_APPENDER_NAME): Option[FileAppender[_]]
-
def
setLoggingLevel(regex: String, level: Level, forFuture: Boolean = false): Seq[String]
Set Logging Level Generically.
Set Logging Level Generically. This function sets the logging level for any pkg that matches a regular expression. This allows a variety of loggers to be set without knowing their full names explicitly.
- regex
A Scala regular expression string for the names of the loggers to match
- level
The level you want any matching loggers to be set to.
- forFuture
When true, the regex is saved and applied to future instantiations of loggers, too.
- returns
A list of the names of the loggers whose levels were set
- def setPageAppender(maxSize: Int, name: String = PAGE_APPENDER_NAME): Unit
- def setStdOutAppender(name: String = STDOUT_APPENDER_NAME): Try[ConsoleAppender[ILoggingEvent]]
- def setToDebug(pkg: String): Seq[String]
-
def
setToDebug(component: LoggingHelper): Seq[String]
Set a component to WARN logging level
- def setToError(pkg: String): Seq[String]
-
def
setToError(component: LoggingHelper): Seq[String]
Set a component to ERROR logging level
- def setToInfo(pkg: String): Seq[String]
-
def
setToInfo(component: LoggingHelper): Seq[String]
Set a component to WARN logging level
- def setToTrace(pkg: String): Seq[String]
-
def
setToTrace(component: LoggingHelper): Seq[String]
Set a component to WARN logging level
- def setToWarn(pkg: String): Seq[String]
-
def
setToWarn(component: LoggingHelper): Seq[String]
Set a component to WARN logging level
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
- def waitForRootLoggerContext(attempts: Long = 40L, sleepTime: FiniteDuration = 50.milliseconds)(implicit ec: ExecutionContext): Future[LoggerContext]