-
-
Notifications
You must be signed in to change notification settings - Fork 69
LogStage: logMethod support #2266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
fd6fcc2
to
e4344a9
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #2266 +/- ##
===========================================
+ Coverage 66.65% 66.71% +0.06%
===========================================
Files 597 601 +4
Lines 11732 11805 +73
Branches 1317 1326 +9
===========================================
+ Hits 7820 7876 +56
- Misses 3912 3929 +17 🚀 New features to boost your workflow:
|
logImplicits: Boolean, | ||
qp: c.Expr[QuasiIO[F]], | ||
): c.Expr[F[A]] = { | ||
val (variables, logString) = createVariablesAndLogStringTrees(function, logTypes, logImplicits) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
val (variables, logString) = createVariablesAndLogStringTrees(function, logTypes, logImplicits) | |
logMethodIOF(level, c.Expr[F[A]](q"$qp.maybeSuspend($function)"), logTypes, logImplicits, qp) |
Should work, since c.Expr[QuasiIO[F]] is <: c.Expr[QuasiPrimitives[F]]
logstage/logstage-core/src/main/scala-3/izumi/logstage/api/logger/AbstractMacroLogIO.scala
Outdated
Show resolved
Hide resolved
- logMethod test - use default parameters in scala3 macro
def add(x: Int) ... def add(x: Int, y: Int) ...
719359c
to
36e9466
Compare
…ggers/LogIOMacroLoggers, add logMethod* for Raw and Strict loggers, fix bug: fully qualify Log.Entry in LogMethodMacro
…he log string. Remove redundant `getMethodBySignature` - just use m.symbol.asMethod
…thodF. Allow named parameters and runtime values for printTypes and printImplicits in logMethod/F. Add Strict/Raw variants for logMethod/F. Add AbstractLogIO.widenError. Fully unify default/Strict/Raw loggers, remove AbstractMacroLogger* variant traits. Add more tests.
…e they are now constant vals inside the prefix object
…t* copypaste, read printTypes/printImplicits at runtime, assemble messages at runtime, merge getMethodArguments/getMethodSymbol loops into a single loop
…, add "using" to implicit parameter list in log, add LogstageCodec for Unit, add LogIORaw2/3 type aliases. Add test that side-effects in logger argument do not happen twice when logging is disabled and that side effects in implicits do not happen twice when printImplicits is disabled. Check that evaluation of level,printTypes,printImplicits parameters only happens once. test strict/raw logIO loggers. test logIO.logValues
Fix #2157