Made the "logLevel" property for the AppArguments protocol in the sample app target non-optional.

This commit is contained in:
2025-09-30 14:54:00 +02:00
parent 2f03908cc7
commit 6b3cc44a15
3 changed files with 3 additions and 3 deletions
@@ -38,6 +38,6 @@ extension SampleApp {
name: .long, name: .long,
help: "A log level to configure in a type that interacts with the logging system." help: "A log level to configure in a type that interacts with the logging system."
) )
var logLevel: Logger.Level? var logLevel: Logger.Level = .trace
} }
} }
@@ -26,7 +26,7 @@ protocol AppArguments {
var port: Int { get } var port: Int { get }
/// A log level to configure in a type that interacts with the logging system. /// A log level to configure in a type that interacts with the logging system.
var logLevel: Logger.Level? { get } var logLevel: Logger.Level { get }
} }
+1 -1
View File
@@ -35,7 +35,7 @@ extension SampleApp: AsyncParsableCommand {
let builder = AppBuilder(logger: { let builder = AppBuilder(logger: {
var logger = Logger(label: "sample.hummingbird-docc.logger") var logger = Logger(label: "sample.hummingbird-docc.logger")
logger.logLevel = arguments.logLevel ?? .trace logger.logLevel = arguments.logLevel
return logger return logger
}()) }())