7mind / izumi

Productivity-oriented collection of lightweight fancy stuff for Scala toolchain
https://izumi.7mind.io
BSD 2-Clause "Simplified" License
613 stars 66 forks source link

Logstage: macro helper for logging method calls with parameters and returns #2157

Open neko-kai opened 1 month ago

neko-kai commented 1 month ago
log.logMethod(Debug) {
  f(a, b, c)
} // call to f with a=1 b=2 c=3 produced res=6
(f(-1, 2, 3): F[String, Int])
  .logMethod(Debug) // call to f with a=-1 b=2 c=3 produced error="Number must not be negative"