 ///   - function: Function name.
 ///   - line: Line number.
 public func BFLog(_ message: String, filename: String = #file, function: StaticString = #function, line: Int = #line) {
-    #if DEBUG
+    if BFLogActive {
         var _message = message
         if _message.hasSuffix("\n") == false {
             _message += "\n"

        print("\(timestamp) \(filenameWithoutExtension):\(line) \(function): \(_message)", terminator: "")
        
        BFLogInternal.detailedLogString += log
    #endif
}

/// Get the log string.
public var BFLogString: String {
    #if DEBUG
        return BFLogInternal.logString
    #else
        return ""
    #endif
}

/// Get the detailed log string.
public var BFLogDetailedString: String {
    #if DEBUG
        return BFLogInternal.detailedLogString
    #else
        return ""
    #endif
}

/// Clear the log string.
public func BFLogClear() {
    #if DEBUG
        BFLogInternal.clearLog()
    #endif
}

// MARK: - BFLogInternal class


// MARK: - Global functions

/// Exenteds NSLog.
///
/// Activate it by setting BFLogActive variable to true before using it.
///
/// - Parameters:
///   - message: Console message.
