diff options
author | Matthew Adams <matthew@matthewadams.me> | 2020-08-27 02:03:49 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-27 11:03:49 +0200 |
commit | 81811e80e1c903d8f8baa305e2d0141d1b27a142 (patch) | |
tree | e4abc7be478fe7bca3f67a53802a2bd3e239acbc | |
parent | 6b95b25000a713cb86cdb5ddceb5aa46c819962e (diff) |
docs(std/log): update example (#7157)
-rw-r--r-- | std/log/README.md | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/std/log/README.md b/std/log/README.md index b5e99525a..8f18a15d4 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({ |