Skip to content

Commit 50b0989

Browse files
authored
fixup: typo and improve supporting text in logging hook
Signed-off-by: Todd Baert <[email protected]>
1 parent bcb8cf1 commit 50b0989

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

specification/appendix-a-included-utilities.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -376,8 +376,12 @@ The logging hook is a hook which logs messages during the flag evaluation life-c
376376

377377
> The evaluation context **SHOULD** only be logged if an associated option indicates so.
378378
379-
The can be a constructor option or similar, for example: `boolean printContext`.
379+
This can be a constructor option or similar, for example: `boolean printContext`.
380380

381381
> If logging the evaluation context is enabled, it **MUST** be printed in such a way that it's human readable.
382382
383-
> If the logger abstraction in the SDK supports a log level concept, the appropriate log level **SHOULD** be used for each stage (before/after: info, error: error).
383+
Consider printing the evaluation context as a stringified JSON object, or using some other format that allows the nested properties to be easily read.
384+
385+
> If the logger abstraction in the SDK supports a log level concept, the appropriate log level **SHOULD** be used for each stage (before/after: debug/info, error: error).
386+
387+
Consider using `debug` or `info` levels for the `before` and `after` stages, and the `error` level for the `error` stage.

0 commit comments

Comments
 (0)