Package guru.zoroark.tegral.logging

Types

Link copied to clipboard
data class LoggerConfig(val level: LogLevel)

Configuration for an individual logger.

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class LoggerName(val name: String)

Annotation that can be used to annotate a Tegral DI class and use a custom logger.

Link copied to clipboard
data class LoggingConfig(val loggers: Map<String, LoggerConfig> = mapOf(), val level: LogLevel = LogLevel.Info)

The [tegral.logging] configuration object.

Link copied to clipboard
object LoggingFeature : ConfigurableFeature, LifecycleHookedFeature

A feature that adds logging support to the application via the by scope() syntax.

Link copied to clipboard
enum LogLevel : Enum<LogLevel>

The log levels.

Functions

Link copied to clipboard
fun ContextBuilderDsl.putLoggerFactory()

Adds Tegral Logging's Logger factory to this context builder. You do not need to call this if you are using the Tegral Logging feature. This is mostly useful for manually adding logging in test environments that do not support features (i.e. every Tegral test except integration tests).

Properties

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

Computes the logger name for the given class, using (in orrder) a LoggerName annotation or the qualified name of the class or<anon>.