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. 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 ()
- Alphabetic
- By Inheritance
- Logs
- LogsVOps
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def byName(name: String): I[Logging[F]]
Creates an instance of tofu.logging.Logging for a given arbitrary string name, using it to create underlying org.slf4j.Logger with.
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- final def biwiden[I1[a] >: I[a], F1[a] >: F[a]]: Logs[I1, F1]
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def forService[Svc](implicit Svc: ClassTag[Svc]): I[Logging[F]]
Creates an instance of tofu.logging.Logging with a given arbitrary type tag, using it as a class to create underlying org.slf4j.Logger with.
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def named[name <: String with Singleton](implicit name: ValueOf[name]): I[ServiceLogging[F, name]]
- Definition Classes
- LogsVOps
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def of[Svc[_[_]]](implicit tag: ClassTag[Svc[Any]]): I[ServiceLogging[F, Svc[Any]]]
An alternative to service method for tagless final services.
An alternative to service method for tagless final services.
trait Service[F[_]]{ ...} object Service extends Logging.Companion[Service] val logs: Logs.Universal[F] = ??? val serviceLog = logs.of[Service] //ServiceLogging[
Example: - final def service[Svc](implicit arg0: ClassTag[Svc]): I[ServiceLogging[F, Svc]]
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated