0001    /**
0002     * Copyright IBM Corporation 2016
0003     *
0004     * Licensed under the Apache License, Version 2.0 (the "License");
0005     * you may not use this file except in compliance with the License.
0006     * You may obtain a copy of the License at
0007     *
0008     * http://www.apache.org/licenses/LICENSE-2.0
0009     *
0010     * Unless required by applicable law or agreed to in writing, software
0011     * distributed under the License is distributed on an "AS IS" BASIS,
0012     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
0013     * See the License for the specific language governing permissions and
0014     * limitations under the License.
0015     **/
0016    
0017    public enum LoggerMessageType
Logger.swift:27
    func log(type: LoggerMessageType, msg: String,
: String { 0018 case Verbose
Logger.swift:39
            logger?.log( .Verbose, msg: msg,
= "VERBOSE" 0019 case Info
Logger.swift:45
            logger?.log( .Info, msg: msg,
= "INFO" 0020 case Debug = "DEBUG" 0021 case Warning
Logger.swift:51
            logger?.log( .Warning, msg: msg,
Logger.swift:63
            logger?.log( .Warning, msg: msg,
= "WARNING" 0022 case Error
Logger.swift:57
            logger?.log( .Error, msg: msg,
= "ERROR" 0023 } 0024 0025 public protocol Logger
Logger.swift:34
    public static var logger: Logger?
{ 0026 0027 func log
Logger.swift:39
            logger?.log( .Verbose, msg: msg,
Logger.swift:45
            logger?.log( .Info, msg: msg,
Logger.swift:51
            logger?.log( .Warning, msg: msg,
Logger.swift:57
            logger?.log( .Error, msg: msg,
Logger.swift:63
            logger?.log( .Warning, msg: msg,
(type: LoggerMessageType, msg: String, 0028 functionName: String, lineNum: Int, fileName: String ) 0029 0030 } 0031 0032 public class Log { 0033 0034 public static var logger
Logger.swift:39
            logger?.log( .Verbose, msg: msg,
Logger.swift:45
            logger?.log( .Info, msg: msg,
Logger.swift:51
            logger?.log( .Warning, msg: msg,
Logger.swift:57
            logger?.log( .Error, msg: msg,
Logger.swift:63
            logger?.log( .Warning, msg: msg,
: Logger? 0035 0036 0037 public static func verbose(msg: String, functionName: String = __FUNCTION__, 0038 lineNum: Int = __LINE__, fileName: String = __FILE__ ) { 0039 logger?.log( .Verbose, msg: msg, 0040 functionName: functionName, lineNum: lineNum, fileName: fileName) 0041 } 0042 0043 public class func info(msg: String, functionName: String = __FUNCTION__, 0044 lineNum: Int = __LINE__, fileName: String = __FILE__) { 0045 logger?.log( .Info, msg: msg, 0046 functionName: functionName, lineNum: lineNum, fileName: fileName) 0047 } 0048 0049 public class func warning(msg: String, functionName: String = __FUNCTION__, 0050 lineNum: Int = __LINE__, fileName: String = __FILE__) { 0051 logger?.log( .Warning, msg: msg, 0052 functionName: functionName, lineNum: lineNum, fileName: fileName) 0053 } 0054 0055 public class func error(msg: String, functionName: String = __FUNCTION__, 0056 lineNum: Int = __LINE__, fileName: String = __FILE__) { 0057 logger?.log( .Error, msg: msg, 0058 functionName: functionName, lineNum: lineNum, fileName: fileName) 0059 } 0060 0061 public class func debug(msg: String, functionName: String = __FUNCTION__, 0062 lineNum: Int = __LINE__, fileName: String = __FILE__) { 0063 logger?.log( .Warning, msg: msg, 0064 functionName: functionName, lineNum: lineNum, fileName: fileName) 0065 } 0066 0067 0068 0069 }