Skip to content

You're viewing documentation for a pre-release version. View the latest stable version

Instance Method

maxLevel(_:)

Make the current fragment conditional, only calling its output method if the record’s loggerLevel is maxLevel or lower
func maxLevel(_ level: Logger.Level) -> IfMaxLevelFragment<Self>

Mentioned in

Discussion

The sequence

Literal("IsDebugOrTrace").maxLevel(.debug)

will only include “IsDebugOrTrace” in the output when the log level is debug or lower.