Package org.kodein.log

Types

Instant
Link copied to clipboard
class Instant
typealias Instant = <ERROR CLASS>
class Instant(tv_sec: <ERROR CLASS>, tv_nsec: Long)
LogFilter
Link copied to clipboard
common
fun fun interface LogFilter
SAM interface that helps to restrain or enhance logs
LogFrontend
Link copied to clipboard
common
fun fun interface LogFrontend
Logger
Link copied to clipboard
common
class Logger(tag: Logger.Tag, frontEnds: Collection<LogFrontend>, filters: List<LogFilter>, mappers: List<LogMapper>)
Logger
LoggerFactory
Link copied to clipboard
common
class LoggerFactory(frontends: Collection<LogFrontend>, filters: List<LogFilter>, mappers: List<LogMapper>)
Factory for Logger that aims to carry a common configuration for all the Loggers of your application.
LogMapper
Link copied to clipboard
common
fun fun interface LogMapper
SAM interface that helps altering each log depending on the filter implementation.
LogReceiver
Link copied to clipboard
common
fun fun interface LogReceiver
SAM interface that helps defining what to do with a given Logger.EntryUsually used in LogFrontend implementations

Functions

newLogger
Link copied to clipboard
common
inline fun <T> LoggerFactory.newLogger(): Logger
Create a Tag is mapped from the type parameter KClass
inline fun <T> T.newLogger(factory: LoggerFactory): Logger
Create a Tag is mapped from type receiver T
fun LoggerFactory.newLogger(cls: KClass<*>): Logger
Create new Logger from a KClass
fun LoggerFactory.newLogger(pkg: String, name: String): Logger
Create new Logger from a package/name pair mapped to a Tag
now
Link copied to clipboard
fun now(): Instant
fun now(): Instant
fun now(): Instant
toLocalString
Link copied to clipboard
common
fun Instant.toLocalString(): String
withShortPackageKeepLast
Link copied to clipboard
common
fun LogFrontend.withShortPackageKeepLast(count: Int): LogFrontend
Shrink Logger.Tag package name to its first letter, except for the last one(s)
withShortPackages
Link copied to clipboard
common
fun LogFrontend.withShortPackages(): LogFrontend
Shrink every Logger.Tag package name to its first letter
withShortPackageShortenFirst
Link copied to clipboard
common
fun LogFrontend.withShortPackageShortenFirst(count: Int): LogFrontend
Shrink Logger.Tag package name to its first letter

Properties

platformPackageName
Link copied to clipboard
val KClass<*>.platformPackageName: String
platformSimpleName
Link copied to clipboard
val KClass<*>.platformSimpleName: String