package odin
- Alphabetic
- By Inheritance
- odin
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
sealed
trait
Level extends AnyRef
Message log level
- trait Logger[F[_]] extends AnyRef
- trait LoggerInstances extends AnyRef
-
case class
LoggerMessage(level: Level, message: Eval[String], context: Map[String, String], exception: Option[Throwable], position: Position, threadName: String, timestamp: Long) extends Product with Serializable
Final log message that contains all the possible information to render
Final log message that contains all the possible information to render
- level
log level of the message
- message
string message
- context
some MDC
- exception
exception if exists
- position
origin of log
- threadName
current thread name
- timestamp
Epoch time in milliseconds at the moment of log
- trait Noop extends AnyRef
Value Members
-
def
asyncFileLogger[F[_]](fileName: String, formatter: Formatter = Formatter.default, timeWindow: FiniteDuration = 1.second, maxBufferSize: Option[Int] = None, minLevel: Level = Level.Trace)(implicit arg0: Concurrent[F], arg1: Timer[F], arg2: ContextShift[F]): Resource[F, Logger[F]]
Create async logger with safe log file allocation and intermediate async buffer
Create async logger with safe log file allocation and intermediate async buffer
- fileName
name of log file to append to
- formatter
formatter to use
- timeWindow
pause between async buffer flushing
- maxBufferSize
maximum buffer size
-
def
consoleLogger[F[_]](formatter: Formatter = Formatter.default, minLevel: Level = Level.Trace)(implicit arg0: Sync[F], arg1: Timer[F]): Logger[F]
Basic console logger that prints to STDOUT & STDERR
Basic console logger that prints to STDOUT & STDERR
- formatter
formatter to use for log messages
- minLevel
minimal level of logs to be printed
-
def
fileLogger[F[_]](fileName: String, formatter: Formatter = Formatter.default, minLevel: Level = Level.Trace)(implicit arg0: Sync[F], arg1: Timer[F]): Resource[F, Logger[F]]
Create logger with safe log file allocation suspended inside of
Resource
Create logger with safe log file allocation suspended inside of
Resource
- fileName
name of log file to append to
- formatter
formatter to use
- object Level
- object Logger extends Noop with LoggerInstances