p

tofu

logging

package logging

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. logging
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Package Members

  1. package atom
  2. package bi
  3. package builder
  4. package impl
  5. package internal
  6. package location

Type Members

  1. final case class BigIntValue(value: BigInt) extends LogParamValue with Product with Serializable
  2. final case class BoolValue(value: Boolean) extends LogParamValue with Product with Serializable
  3. final case class DecimalValue(value: BigDecimal) extends LogParamValue with Product with Serializable
  4. trait DictLoggable[A] extends Loggable[A]

    specialized Loggable for multi-field objects

  5. final case class FloatValue(value: Double) extends LogParamValue with Product with Serializable
  6. trait HideLoggable[A] extends Loggable[A]

    specialized loggable that will not be rendered in the message

  7. final case class IntValue(value: Long) extends LogParamValue with Product with Serializable
  8. class LogAnnotation[A] extends AnyRef

    Type-safe annotation for loggable values

    Type-safe annotation for loggable values

    In particular this solves two problems:

    1. limit the number of fields your app logs
    2. 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)
    Example:
    1. val count = LogAnnotation.make[Int]("count")
      logger.info("Count has type Int", count -> 100)
      // logger.error("This line wouldn't be compiled", count -> "100")
  9. trait LogBuilder[U] extends AnyRef

    contains some LogRenderer and therefore can accept loggable values and do something with them

  10. final class LogMidOps[U[f[_]], F[_]] extends AnyVal
  11. sealed trait LogParamValue extends LogTree
  12. 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 and V for each subcontext this would require however polymorphic lambdas everywhere, so we are praise for user consciousness for not reusing I and V 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

  13. sealed trait LogTree extends AnyRef
  14. trait Loggable[A] extends Base[A]

    Typeclass for adding custom log values to message

  15. trait LoggableContext[F[_]] extends AnyRef

    Proof that F has contextual value and it is loggable

  16. class LoggableInstances extends AnyRef
  17. final class LoggedThrowable extends Throwable with LoggedValue
  18. trait LoggedValue extends AnyRef
  19. trait Logging[F[_]] extends ServiceLogging[F, Nothing]

    Typeclass for logging.

    Typeclass for logging.

    See also

    tofu.logging.Logs for creating instances of that trait

  20. 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

    Example:
    1. class FooService[F[_] : FooService.Log] object FooService extends LoggingCompanion[FooService]
  21. 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

  22. 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

  23. 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:

    Example:
    1.  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 ()
  24. trait LogsVOps[+I[_], F[_]] extends AnyRef
  25. type ModuleLog[F[_], U[_[_]]] = ServiceLogging[F, U[Any]]
  26. 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 of Logs.forService method

  27. trait SingleValueLoggable[A] extends Loggable[A] with SubLoggable[A]

    specialized loggable that containing single value to log

  28. final case class StrValue(value: String) extends LogParamValue with Product with Serializable
  29. trait SubLoggable[A] extends Loggable[A]

    specialized loggable containing no fields, only suitable to be logged as part of something

  30. class TethysBuilder extends LogBuilder[String]
  31. class TethysBuilderWithCustomFields extends TethysBuilder
  32. trait ToStringLoggable[A] extends Loggable[A]

    specialized loggable where value is rendered by .toString method

Deprecated Type Members

  1. 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

  1. object LogAnnotation
  2. object LogParamValue
  3. object LogRenderer extends Serializable
  4. object LogTree extends LogBuilder[Json]
  5. object Loggable extends LoggableInstances with DataComp[Loggable]
  6. object LoggableContext
  7. object LoggedValue
  8. object Logging
  9. object LoggingErrMid
  10. object LoggingMid extends DefaultImpl
  11. object LoggingMidFunctions
  12. object Logs extends LogsInstances with LogsInstances0
  13. case object NullValue extends LogParamValue with Product with Serializable
  14. object ServiceLogging
  15. object TethysBuilder extends TethysBuilder

Inherited from AnyRef

Inherited from Any

Ungrouped