0001    //
0002    //  ConsoleDestination.swift
0003    //  SwiftyBeaver
0004    //
0005    //  Created by Sebastian Kreutzberger on 05.12.15.
0006    //  Copyright © 2015 Sebastian Kreutzberger
0007    //  Some rights reserved: http://opensource.org/licenses/MIT
0008    //
0009    
0010    import Foundation
0011    
0012    public class ConsoleDestination: BaseDestination {
0013        
0014        override public var defaultHashValue: Int {return 1}
0015        
0016        public override init() {
0017            super.init()
0018        }
0019        
0020        // print to Xcode Console. uses full base class functionality
0021        override public func send(level: SwiftyBeaver.Level, msg: String, thread: String, path: String, function: String, line: Int) -> String? {
0022            let formattedString = super.send(level, msg: msg, thread: thread, path: path, function: function, line: line)
0023            
0024            if let str = formattedString {
0025                print(str)
0026            }
0027            return formattedString
0028        }
0029    }