479cce4546
* Stop pinning the scroll offset in moving programmatically * Add 'optional' string interpolation * Add comments * Add CoreTests.test_initial_scroll_offset_reset() * ci: remove macos-12 jobs for the deprecation * ci: name circleci jobs
29 lines
788 B
Swift
29 lines
788 B
Swift
// Copyright 2018-Present Shin Yamamoto. All rights reserved. MIT license.
|
|
|
|
import os.log
|
|
|
|
let msg = StaticString("%{public}@")
|
|
let sysLog = OSLog(subsystem: Logging.subsystem, category: Logging.category)
|
|
#if FP_LOG
|
|
let devLog = OSLog(subsystem: Logging.subsystem, category: "\(Logging.category):dev")
|
|
#else
|
|
let devLog = OSLog.disabled
|
|
#endif
|
|
|
|
struct Logging {
|
|
static let subsystem = "com.scenee.FloatingPanel"
|
|
static let category = "FloatingPanel"
|
|
private init() {}
|
|
}
|
|
|
|
extension String.StringInterpolation {
|
|
mutating func appendInterpolation<T>(optional: T?, defaultValue: String = "nil") {
|
|
switch optional {
|
|
case let value?:
|
|
appendLiteral(String(describing: value))
|
|
case nil:
|
|
appendLiteral(defaultValue)
|
|
}
|
|
}
|
|
}
|