XcodeLogConfiguration
open class XcodeLogConfiguration: ConsoleLogConfiguration
A LogConfiguration
optimized for use when running within Xcode.
-
init(minimumSeverity:debugMode:verboseDebugMode:stdStreamsMode:mimicOSLogOutput:showCallSite:filters:)
Initializes a new
XcodeLogConfiguration
instance.Warning
Setting either
debugMode
orverboseDebugMode
totrue
will result insynchronousMode
being used when recording log entries. Synchronous mode is helpful while debugging, as it ensures that logs are always up-to-date when debug breakpoints are hit. However, synchronous mode can have a negative influence on performance and is therefore not recommended for use in production code.Declaration
Swift
public init(minimumSeverity: LogSeverity = .info, debugMode: Bool = false, verboseDebugMode: Bool = false, stdStreamsMode: StandardStreamsMode = .useAsFallback, mimicOSLogOutput: Bool = true, showCallSite: Bool = true, filters: [LogFilter] = [])
Parameters
minimumSeverity
The minimum supported
LogSeverity
. AnyLogEntry
having aseverity
less thanminimumSeverity
will be silently ignored.debugMode
If
true
, the value ofminimumSeverity
will be lowered (if necessary) to.debug
andsynchronousMode
will be used when recording log entries.verboseDebugMode
If
true
, the value ofminimumSeverity
will be lowered (if necessary) to.verbose
andsynchronousMode
will be used when recording log entries.stdStreamsMode
A
StandardStreamsMode
value that governs when standard console streams (i.e.,stdout
andstderr
) should be used for recording log output.mimicOSLogOutput
If
true
, any output sent tostdout
will be formatted in such a way as to mimic the output seen whenos_log()
is used.showCallSite
If
true
, the source file and line indicating the call site of the log request will be added to formatted log messages.filters
The
LogFilter
s to use when deciding whether a givenLogEntry
should be passed along for recording.