Skip to content

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

Merged
merged 26 commits into from
Jun 6, 2025
Merged

LogStage: logMethod support #2266

merged 26 commits into from
Jun 6, 2025

Conversation

nikita-ty754
Copy link
Contributor

@nikita-ty754 nikita-ty754 commented Apr 3, 2025

Fix #2157

@nikita-ty754 nikita-ty754 force-pushed the feature/logstage-log-method branch from fd6fcc2 to e4344a9 Compare April 3, 2025 14:02
Copy link

codecov bot commented Apr 3, 2025

Codecov Report

Attention: Patch coverage is 64.89362% with 33 lines in your changes missing coverage. Please review.

Project coverage is 66.71%. Comparing base (81b7574) to head (eb4a4cf).
Report is 1 commits behind head on develop.

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:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

logImplicits: Boolean,
qp: c.Expr[QuasiIO[F]],
): c.Expr[F[A]] = {
val (variables, logString) = createVariablesAndLogStringTrees(function, logTypes, logImplicits)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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]]

@neko-kai neko-kai force-pushed the feature/logstage-log-method branch from 719359c to 36e9466 Compare May 29, 2025 22:38
neko-kai added 10 commits May 29, 2025 23:40
…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
neko-kai added 3 commits June 5, 2025 20:04
…, 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
@neko-kai neko-kai merged commit f31de87 into develop Jun 6, 2025
45 of 46 checks passed
@neko-kai neko-kai deleted the feature/logstage-log-method branch June 6, 2025 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Logstage: macro helper for logging method calls with parameters and returns
2 participants