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
XcodeLogConfigurationinstance.Warning
Setting either
debugModeorverboseDebugModetotruewill result insynchronousModebeing 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
minimumSeverityThe minimum supported
LogSeverity. AnyLogEntryhaving aseverityless thanminimumSeveritywill be silently ignored.debugModeIf
true, the value ofminimumSeveritywill be lowered (if necessary) to.debugandsynchronousModewill be used when recording log entries.verboseDebugModeIf
true, the value ofminimumSeveritywill be lowered (if necessary) to.verboseandsynchronousModewill be used when recording log entries.stdStreamsModeA
StandardStreamsModevalue that governs when standard console streams (i.e.,stdoutandstderr) should be used for recording log output.mimicOSLogOutputIf
true, any output sent tostdoutwill be formatted in such a way as to mimic the output seen whenos_log()is used.showCallSiteIf
true, the source file and line indicating the call site of the log request will be added to formatted log messages.filtersThe
LogFilters to use when deciding whether a givenLogEntryshould be passed along for recording.
View on GitHub
XcodeLogConfiguration Class Reference