Skip to content

Commit

Permalink
logging - 2.12 compilation fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dos65 committed Apr 8, 2024
1 parent feb9ad0 commit 170ae10
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion modules/kernel/src/main/scala/tofu/common/Display.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package tofu.common
import cats.{Eval, Show}
import java.util.UUID
import scala.collection.immutable.{BitSet, Queue, SortedMap, SortedSet}
import scala.collection.immutable.{BitSet, Queue, Seq, SortedMap, SortedSet}
import scala.concurrent.duration.Duration
import scala.util.Try

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import tofu.syntax.functorbk._
import tofu.syntax.monadic._

trait LoggingBiCompanion[U[_[_, _]]] {
type Log[F[_, _]] = ServiceLogging[F[Nothing, _], U[({ type L[_, _] = Any })#L]]
type Log[F[_, _]] = ServiceLogging[F[Nothing, _], U[({ type L[a, b] = Any })#L]]

implicit def toBiLogBiMidOps[F[+_, +_]](uf: U[F]): LogBiMidOps[U, F] = new LogBiMidOps(uf)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import scala.collection.mutable.Buffer
import scala.reflect.ClassTag

trait BiBuilder[+T[_, _]] {
def prepare[Alg[_[_, _]]](implicit Alg: ClassTag[Alg[({ type L[_, _] = Any })#L]]): BiPrepared[Alg, T]
def prepare[Alg[_[_, _]]](implicit Alg: ClassTag[Alg[({ type L[a, b] = Any })#L]]): BiPrepared[Alg, T]
}

trait BiMethod[U[f[_, _]], Err, Res, +T[_, _]] {
Expand Down Expand Up @@ -42,7 +42,7 @@ abstract class LoggingBiMidBuilder extends BiBuilder[LoggingBiMid] {
ok: Boolean
): F[Nothing, Unit]

def prepare[Alg[_[_, _]]](implicit Alg: ClassTag[Alg[({ type L[_, _] = Any })#L]]) =
def prepare[Alg[_[_, _]]](implicit Alg: ClassTag[Alg[({ type L[a, b] = Any })#L]]) =
new PreparedImpl[Alg](Alg.runtimeClass)

protected class MethodImpl[U[f[_, _]], Err: Loggable, Res: Loggable](
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ object LoggingMidBuilder {

class CustomLevelImpl(logLevel: Level) extends CustomLevel {
override def onLog[F[_]](message: String, values: LoggedValue*)(implicit F: LoggingBase[F]): F[Unit] =
F.write(logLevel, message, values)
F.write(logLevel, message, values: _*)
}
}

Expand Down Expand Up @@ -162,6 +162,6 @@ object LoggingErrMidBuilder {
class CustomLevelImpl[E](logLevel: Level, errorLogLevel: Level)(implicit val errLoggable: Loggable[E])
extends LoggingMidBuilder.CustomLevelImpl(logLevel) with CustomLevel[E] {
override def onFaultLog[F[_]](message: String, values: LoggedValue*)(implicit F: LoggingBase[F]): F[Unit] =
F.write(errorLogLevel, message, values)
F.write(errorLogLevel, message, values: _*)
}
}

0 comments on commit 170ae10

Please sign in to comment.