diff --git a/README.MD b/README.MD index 8b89abe..f5a01f1 100644 --- a/README.MD +++ b/README.MD @@ -86,14 +86,10 @@ object SomeObject extends LoggingSupport { logger.errorIO("Game over", new IllegalStateException("This is the end")) ) - doEvenMoreStuff = ZIO.ifM(random.nextBoolean)( - ZIO.sleep(8.millis).as(42), ZIO.fail(new RuntimeException("That didn't work"))) - - // Generate highly configurable performance logs with ease: - _ <- doEvenMoreStuff.perfLog { - LogSpec.onSucceed[Int]((d, i) => debug"Finally done with $i after ${d.render}").withThreshold(5.millis) ++ - LogSpec.onError[Throwable]((d, e) => error"Darn, failed again with $e after only ${d.render}") - } + _ <- ZIO.sleep(8.millis).perfLog( + // See below for more examples with `LogSpec` + LogSpec.onSucceed[Int]((d, i) => debug"Finally done with $i after ${d.render}") + .withThreshold(5.millis)) } yield () } }