ResourceLoggerSyntax

class ResourceLoggerSyntax[F[_]](resource: Resource[F, Logger[F]])

Syntax for loggers suspended in Resource (i.e. AsyncLogger or FileLogger)

Syntax for loggers suspended in Resource (i.e. AsyncLogger or FileLogger)

class Object
trait Matchable
class Any

Value members

Concrete methods

def contramap(f: LoggerMessage => LoggerMessage)(clock: Clock[F], F: Monad[F]): Resource[F, Logger[F]]

Intercept logger message before it's written to the logger

Intercept logger message before it's written to the logger

def filter(f: LoggerMessage => Boolean)(clock: Clock[F], F: Monad[F]): Resource[F, Logger[F]]

Filter messages given the predicate. Falsified cases are dropped from the logging

Filter messages given the predicate. Falsified cases are dropped from the logging

def withAsync(timeWindow: FiniteDuration, maxBufferSize: Option[Int])(F: Async[F]): Resource[F, Logger[F]]

Create async logger that buffers the messages up to the limit (if any) and flushes it down the chain each timeWindow

Create async logger that buffers the messages up to the limit (if any) and flushes it down the chain each timeWindow

Value Params
maxBufferSize

max logs buffer size

timeWindow

pause between async buffer flushing

Returns

Logger suspended in Resource. Once this Resource started, internal flush loop is initialized. Once resource is released, flushing is also stopped.

def withConstContext(ctx: Map[String, String])(clock: Clock[F], monad: Monad[F]): Resource[F, Logger[F]]

Create logger that adds constant context to each log record

Create logger that adds constant context to each log record

Value Params
ctx

constant context

def withContext(clock: Clock[F], monad: Monad[F], withContext: WithContext[F]): Resource[F, Logger[F]]

Create contextual logger that is capable of picking up context from inside of F[_]. See ContextualLogger for more info

Create contextual logger that is capable of picking up context from inside of F[_]. See ContextualLogger for more info

def withSecretContext(key: String, keys: String*)(timer: Clock[F], monad: Monad[F]): Resource[F, Logger[F]]

Create logger that hashes context value given that context key matches one of the arguments

Create logger that hashes context value given that context key matches one of the arguments