package logging
- Alphabetic
- By Inheritance
- logging
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Package Members
Type Members
- final case class BigIntValue(value: BigInt) extends LogParamValue with Product with Serializable
- final case class BoolValue(value: Boolean) extends LogParamValue with Product with Serializable
- final case class DecimalValue(value: BigDecimal) extends LogParamValue with Product with Serializable
- trait DictLoggable[A] extends Loggable[A]
specialized Loggable for multi-field objects
- final case class FloatValue(value: Double) extends LogParamValue with Product with Serializable
- trait HideLoggable[A] extends Loggable[A]
specialized loggable that will not be rendered in the message
- final case class IntValue(value: Long) extends LogParamValue with Product with Serializable
- class LogAnnotation[A] extends AnyRef
Type-safe annotation for loggable values
Type-safe annotation for loggable values
In particular this solves two problems:
- limit the number of fields your app logs
- set the type of log field (logging the same field as a string and as an object in the same application can lead to problems in your logging platform)
val count = LogAnnotation.make[Int]("count") logger.info("Count has type Int", count -> 100) // logger.error("This line wouldn't be compiled", count -> "100")
Example: - trait LogBuilder[U] extends AnyRef
contains some LogRenderer and therefore can accept loggable values and do something with them
- final class LogMidOps[U[f[_]], F[_]] extends AnyVal
- sealed trait LogParamValue extends LogTree
- trait LogRenderer[I, V, R, M] extends Semigroup[R]
contextual log construction could serve as weak form of JSON building I and V could be the same type: prefix, mutable builder, etc distinction is added to guide Loggable implementation for example, to work with unsafe builders like Tethys Writer
contextual log construction could serve as weak form of JSON building I and V could be the same type: prefix, mutable builder, etc distinction is added to guide Loggable implementation for example, to work with unsafe builders like Tethys Writer
it would be great if we could use unique types
I
andV
for each subcontext this would require however polymorphic lambdas everywhere, so we are praise for user consciousness for not reusingI
andV
values in the embedded scopes- I
some top level context, meaning we are inside dictionary
- V
some value level context, meanin we are building the value
- R
logging result on the top level
- M
logging result on the value level
- sealed trait LogTree extends AnyRef
- trait Loggable[A] extends Base[A]
Typeclass for adding custom log values to message
- trait LoggableContext[F[_]] extends AnyRef
Proof that F has contextual value and it is loggable
- class LoggableInstances extends AnyRef
- final class LoggedThrowable extends Throwable with LoggedValue
- trait LoggedValue extends AnyRef
- trait Logging[F[_]] extends ServiceLogging[F, Nothing]
Typeclass for logging.
Typeclass for logging.
- See also
tofu.logging.Logs for creating instances of that trait
- trait LoggingCompanion[U[_[_]]] extends AnyRef
Mix-in trait that supposed to be extended by companion of service
Mix-in trait that supposed to be extended by companion of service
class FooService[F[_] : FooService.Log] object FooService extends LoggingCompanion[FooService]
Example: - abstract class LoggingErrMid[E, A] extends LoggingMid[A]
Logging middleware supporting error reporting Alg[LoggingErrMid[E, *]] is a special form of implicit evidence of injectable logging support generally you don't need
Logging
instance to derive this so choice of logging postponed until this middleware is attached to the core instance - abstract class LoggingMid[A] extends AnyRef
Logging middleware Alg[LoggingMid] is a special form of implicit evidence of injectable logging support generally you don't need
Logging
instance to derive this so choice of logging postponed until this middleware is attached to the core instance - trait Logs[+I[_], F[_]] extends LogsVOps[I, F]
A helper for creating instances of tofu.logging.Logging, defining a way these instances will behave while doing logging.
A helper for creating instances of tofu.logging.Logging, defining a way these instances will behave while doing logging. Can create instances either on a by-name basic or a type tag basic. An instance of tofu.logging.Logs can be shared between different pieces of code depending on whether logging behaviour should be shared. However it's not uncommon to use different Logs for different parts of program.
Sample usage would be:
val logs: Logs[F, F] = Logs.sync[F, F] def program[F[_]: Sync] = for { logging <- logs.byName("my-logger") _ <- logging.info("this is a message") _ <- logging.info("this is another message") } yield ()
Example: - trait LogsVOps[+I[_], F[_]] extends AnyRef
- type ModuleLog[F[_], U[_[_]]] = ServiceLogging[F, U[Any]]
- trait ServiceLogging[F[_], Service] extends LoggingBase[F]
Logging tagged with some arbitrary tag type.
Logging tagged with some arbitrary tag type.
- Note
there are no guarantees that
Service
correspond to the type parameter ofLogs.forService
method
- trait SingleValueLoggable[A] extends Loggable[A] with SubLoggable[A]
specialized loggable that containing single value to log
- final case class StrValue(value: String) extends LogParamValue with Product with Serializable
- trait SubLoggable[A] extends Loggable[A]
specialized loggable containing no fields, only suitable to be logged as part of something
- class TethysBuilder extends LogBuilder[String]
- class TethysBuilderWithCustomFields extends TethysBuilder
- trait ToStringLoggable[A] extends Loggable[A]
specialized loggable where value is rendered by
.toString
method
Deprecated Type Members
- trait LoggingBase[F[_]] extends AnyRef
Typeclass equivalent of Logger.
Typeclass equivalent of Logger. May contain specified some Logger instance or try to read it from the context
- Annotations
- @deprecated
- Deprecated
(Since version 0.10.4) Use Logging[F] instead
Value Members
- object LogAnnotation
- object LogParamValue
- object LogRenderer extends Serializable
- object LogTree extends LogBuilder[Json]
- object Loggable extends LoggableInstances with DataComp[Loggable]
- object LoggableContext
- object LoggedValue
- object Logging
- object LoggingErrMid
- object LoggingMid extends DefaultImpl
- object LoggingMidFunctions
- object Logs extends LogsInstances with LogsInstances0
- case object NullValue extends LogParamValue with Product with Serializable
- object ServiceLogging
- object TethysBuilder extends TethysBuilder