mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-22 02:18:26 +00:00
Hooking the new pubsub impl into the application
This commit is contained in:
@ -6,6 +6,7 @@
|
||||
|
||||
package docspell.common
|
||||
|
||||
import cats.Applicative
|
||||
import cats.effect.Sync
|
||||
import fs2.Stream
|
||||
|
||||
@ -45,6 +46,27 @@ trait Logger[F[_]] { self =>
|
||||
|
||||
object Logger {
|
||||
|
||||
def off[F[_]: Applicative]: Logger[F] =
|
||||
new Logger[F] {
|
||||
def trace(msg: => String): F[Unit] =
|
||||
Applicative[F].pure(())
|
||||
|
||||
def debug(msg: => String): F[Unit] =
|
||||
Applicative[F].pure(())
|
||||
|
||||
def info(msg: => String): F[Unit] =
|
||||
Applicative[F].pure(())
|
||||
|
||||
def warn(msg: => String): F[Unit] =
|
||||
Applicative[F].pure(())
|
||||
|
||||
def error(ex: Throwable)(msg: => String): F[Unit] =
|
||||
Applicative[F].pure(())
|
||||
|
||||
def error(msg: => String): F[Unit] =
|
||||
Applicative[F].pure(())
|
||||
}
|
||||
|
||||
def log4s[F[_]: Sync](log: Log4sLogger): Logger[F] =
|
||||
new Logger[F] {
|
||||
def trace(msg: => String): F[Unit] =
|
||||
|
Reference in New Issue
Block a user