You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I looked at the hierarchy of Logging and ServiceLogging, and I don't realize why Logging extends from ServiceLogging, not the other way round. I suggest swapping them, also removing the method def to[Svc2]: ServiceLogging[F, Svc2] (because this method does not realy change the name of the logger).
traitLogs[+I[_], F[_]] extendsLogsVOps[I, F] {
// Here is the differencedefforService[Svc](implicitSvc:ClassTag[Svc]):I[ServiceLogging[F, Svc]] =
byName(Svc.runtimeClass.getName()).asInstanceOf[I[ServiceLogging[F, Svc]]]
// Here is the differencedefbyName(name: String):I[ServiceLogging[F, Nothing]]
finaldefbiwiden[I1[a] >:I[a], F1[a] >:F[a]]:Logs[I1, F1] =this.asInstanceOf[Logs[I1, F1]]
finaldefservice[Svc:ClassTag]:I[ServiceLogging[F, Svc]] = forService[Svc]
finaldefof[Svc[_[_]]](implicittag: ClassTag[Svc[HKAny]]):I[ServiceLogging[F, Svc[HKAny]]] =
service[Svc[HKAny]]
}
The reason why I propose this change is because now the base class for logging is ServiceLogging[F, Svc] (base LoggingBase is deprecated), so to add correct syntax impl for logging, you need to require implicit ServiceLogging[F, Any], not Logging[F] which is not obvious.
The text was updated successfully, but these errors were encountered:
@geny200 Thanks for proposal. However I would avoid making such changes as it will add compat issues.
The reason why I propose this change is because now the base class for logging is ServiceLogging[F, Svc] (base LoggingBase is deprecated), so to add correct syntax impl for logging, you need to require implicit ServiceLogging[F, Any], not Logging[F] which is not obvious.
I think that introducing incompatible changes will bong more problems that and issue you describe in this motivation. wdyt?
I think that introducing incompatible changes will bong more problems
The only incompatible change here will be that the Logging type will no longer have the "to" method (I consider that this method should not exist in its current form, because it provides a cheat for types), so we can add "to" method for binary compatibility to Logging and immediately set as deprecated
I looked at the hierarchy of
Logging
andServiceLogging
, and I don't realize whyLogging
extends fromServiceLogging
, not the other way round. I suggest swapping them, also removing the methoddef to[Svc2]: ServiceLogging[F, Svc2]
(because this method does not realy change the name of the logger).suggestion:
also change logs factory:
The reason why I propose this change is because now the base class for logging is
ServiceLogging[F, Svc]
(baseLoggingBase
is deprecated), so to add correct syntax impl for logging, you need to require implicitServiceLogging[F, Any]
, notLogging[F]
which is not obvious.The text was updated successfully, but these errors were encountered: