From 81811e80e1c903d8f8baa305e2d0141d1b27a142 Mon Sep 17 00:00:00 2001 From: Matthew Adams Date: Thu, 27 Aug 2020 02:03:49 -0700 Subject: [PATCH] docs(std/log): update example (#7157) --- std/log/README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/std/log/README.md b/std/log/README.md index b5e99525a2..8f18a15d47 100644 --- a/std/log/README.md +++ b/std/log/README.md @@ -282,8 +282,12 @@ the message. logger.debug(() => `this is expensive: ${expensiveFn(5)}`); ``` -NOTE: When using lazy log evaluation, `undefined` will be returned if the -resolver function is not called because the logger won't log it. E.g. +> NOTE: When using lazy log evaluation, `undefined` will be returned if the +> resolver function is not called because the logger won't log it. It is an +> antipattern use lazy evaluation with inline logging because the return value +> depends on the current log level. + +Example: ```ts await log.setup({