Logs

tofu.logging.Logs
See theLogs companion trait
object Logs extends LogsInstances

Attributes

Companion
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Logs.type

Members list

Type members

Classlikes

class ProvideMPA[I[_], F[_]]

Attributes

Supertypes
class Object
trait Matchable
class Any
class ProvidePA[I[_], F[_]]

Attributes

Supertypes
class Object
trait Matchable
class Any

Types

type Safe[I[_], F[_, _]] = Logs[I, [_] =>> F[Nothing, _$9]]
type SafeUniversal[F[_, _]] = Logs[Id, [_] =>> F[Nothing, _$12]]

Deprecated types

type Universal[F[_]] = Logs[Id, F]

Attributes

Deprecated
[Since version 0.10.4]

Value members

Concrete methods

def apply[I[_], F[_]](implicit logs: Logs[I, F]): Logs[I, F]
def combine[I[_] : Apply, F[_] : Apply](las: Logs[I, F], lbs: Logs[I, F]): Logs[I, F]

Combines two instances of tofu.logging.Logs, resulting in a single one that will produce instances of tofu.logging.Logging by combining. Resulting tofu.logging.Logging instance will call both implementations in order.

Combines two instances of tofu.logging.Logs, resulting in a single one that will produce instances of tofu.logging.Logging by combining. Resulting tofu.logging.Logging instance will call both implementations in order.

Attributes

def const[I[_] : Applicative, F[_]](logging: Logging[F]): Logs[I, F]

Returns an instance of tofu.logging.Logs that will produce the same constant tofu.logging.Logging instances.

Returns an instance of tofu.logging.Logs that will produce the same constant tofu.logging.Logging instances.

Attributes

def empty[I[_] : Applicative, F[_] : Applicative]: Logs[I, F]

Returns an instance of tofu.logging.Logs that will produce a no-op tofu.logging.Logging instances.

Returns an instance of tofu.logging.Logs that will produce a no-op tofu.logging.Logging instances.

Attributes

def provide[I[_], F[_]]: ProvidePA[I, F]

Allows to create Logging instance for the service

Allows to create Logging instance for the service

Attributes

Example
 class MyService[F[_]](log: MyService.Log[F]) {...}
object MyService extends LoggingCompanion[MyService] { def make[I[_], F[_]]: I[MyService[F]] =
Logs.provide[MyService[F]](new MyService[F](_)) } 
def provideM[I[_], F[_]]: ProvideMPA[I, F]

Allows to create Logging instance for the service

Allows to create Logging instance for the service

Same as provide but with ability to perform monadic actions.

Attributes

Example
 class MyService[F[_]](ref: Ref[F, Smth], log: MyService.Log[F]) {...}
object MyService extends LoggingCompanion[MyService] { def make[I[_], F[_]]: I[MyService[F]] =
Logs.provide[MyService[F]]{ log => for { ref <- Ref.make(...) ... } yield new MyService(ref, log) } } 
def sync[I[_] : Delay, F[_] : Monad]: Logs[I, F]

Returns an instance of tofu.logging.Logs that requires Delay to perform logging side-effects. Has no notion of context.

Returns an instance of tofu.logging.Logs that requires Delay to perform logging side-effects. Has no notion of context.

Attributes

def withContext[I[_] : Delay, F[_] : Delay](implicit evidence$1: Delay[I], evidence$2: Monad[F], evidence$3: Delay[F], ctx: LoggableContext[F]): Logs[I, F]

Deprecated methods

def contextual[F[_] : Delay, C : Loggable](implicit evidence$1: FlatMap[F], evidence$2: Delay[F], evidence$3: Loggable[C], FC: WithContext[F, C]): Universal[F]

Attributes

Deprecated
[Since version 0.10.4]
def universal[F[_] : Delay]: Universal[F]

Attributes

Deprecated
[Since version 0.10.4]

Implicits

Implicits

implicit def ops[I[_], F[_]](logs: Logs[I, F]): LogsOps[I, F]

Set of useful syntax stuff for Logs

Set of useful syntax stuff for Logs

Attributes

Inherited implicits

implicit def logs2ApplyK[Y[_]](implicit Y: Apply[Y]): ApplyK[{ type L = [x[_]] =>> Logs[Y, x]; }#<none>]

Attributes

Inherited from:
LogsInstances0 (hidden)
implicit def logs2FunctorK[Y[_]](implicit Y: Functor[Y]): FunctorK[{ type L = [x[_]] =>> Logs[Y, x]; }#<none>]

Attributes

Inherited from:
LogsInstances1 (hidden)
implicit def logs2MonoidalK[Y[_]](implicit Y: Applicative[Y]): MonoidalK[{ type L = [x[_]] =>> Logs[Y, x]; }#<none>]

Attributes

Inherited from:
LogsInstances
implicit def logsMonoid[I[_] : Applicative, F[_] : Applicative]: Monoid[Logs[I, F]]

Attributes

Inherited from:
LogsInstances