Structure
IfMaxLevelFragment
Make the current fragment conditional, only calling its
output method if the record’s loggerLevel is maxLevel or lowerstruct IfMaxLevelFragment<T> where T : LoggerFragment
Overview
The sequence
Literal("IsDebugOrTrace").maxLevel(.debug)
will only include “IsDebugOrTrace” in the output when the log level is debug or lower.
This fragment is considered to not have content if the logging level is higher than than maxLevel.
Topics
Initializers
Instance Properties
Instance Methods
func hasContent(record: inout LogRecord) -> BoolIndicates whether the fragment will write anything tooutputwhenwriteis called. This is used to determine whether writing a separator should be skipped.func write(inout LogRecord, to: inout FragmentOutput)Add this fragment’s output to the console text.
Relationships
Conforms To
LoggerFragmentSwift.SendableSwift.SendableMetatype