Skip to content

Commit

Permalink
Update Logging.swift
Browse files Browse the repository at this point in the history
Additional Swift 3.0 updates
  • Loading branch information
iachievedit committed Jun 5, 2016
1 parent bbdcca5 commit 16617c6
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Sources/Logging.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,27 +33,27 @@ public var slogLevel:SLogLevel = SLogLevel.None
private var slogFilePath:String? = nil

public func SLogVerbose(logString:String) {
SLog(.Verbose, logString:logString.green)
SLog(level:.Verbose, logString:logString.green)
}

public func SLogInfo(logString:String) {
SLog(.Info, logString:logString.white)
SLog(level:.Info, logString:logString.white)
}

public func SLogWarning(logString:String) {
SLog(.Warning, logString:logString.yellow)
SLog(level:.Warning, logString:logString.yellow)
}

public func SLogError(logString:String) {
SLog(.Error, logString:logString.red)
SLog(level:.Error, logString:logString.red)
}

public func ENTRY_LOG(functionName:String = #function) {
SLogVerbose("ENTRY " + functionName)
SLogVerbose(logString:"ENTRY " + functionName)
}

public func EXIT_LOG(functionName:String = #function) {
SLogVerbose("EXIT " + functionName)
SLogVerbose(logString:"EXIT " + functionName)
}

public func slogToFileAtPath(path:String, append:Bool = false) {
Expand All @@ -69,7 +69,7 @@ public func slogToFileAtPath(path:String, append:Bool = false) {

func SLog(logLevel:SLogLevel, logString:String) {

let log = stringForLogLevel(logLevel) + " - " + logString
let log = stringForLogLevel(logLevel:logLevel) + " - " + logString
let appLogLevel = slogLevel.rawValue
if (appLogLevel >= logLevel.rawValue) {
print(log)
Expand Down

0 comments on commit 16617c6

Please sign in to comment.