You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

20 lines
580 B

//
// Copyright © 2019 Swinject Contributors. All rights reserved.
//
public typealias LoggingFunctionType = (String) -> Void
public extension Container {
/// Function to be used for logging debugging data.
/// Default implementation writes to standard output.
static var loggingFunction: LoggingFunctionType? {
get { return _loggingFunction }
set { _loggingFunction = newValue }
}
internal static func log(_ message: String) {
_loggingFunction?(message)
}
}
private var _loggingFunction: LoggingFunctionType? = { print($0) }