From a34327d3b80ee588c581b71d26f4690e5fe44501 Mon Sep 17 00:00:00 2001 From: Woocheol Park Date: Fri, 23 Dec 2016 11:07:59 +0900 Subject: [PATCH] version 0.4.0 update. --- SimpleLog-Swift.podspec | 2 +- SimpleLog-Swift/Classes/Logging.swift | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/SimpleLog-Swift.podspec b/SimpleLog-Swift.podspec index 947be69..e838776 100644 --- a/SimpleLog-Swift.podspec +++ b/SimpleLog-Swift.podspec @@ -2,7 +2,7 @@ Pod::Spec.new do |s| s.name = 'SimpleLog-Swift' -s.version = '0.3.0' +s.version = '0.4.0' s.summary = 'Simple Log for Swift by Park, Woocheol' diff --git a/SimpleLog-Swift/Classes/Logging.swift b/SimpleLog-Swift/Classes/Logging.swift index 64f9c3d..cc8276b 100644 --- a/SimpleLog-Swift/Classes/Logging.swift +++ b/SimpleLog-Swift/Classes/Logging.swift @@ -28,6 +28,10 @@ public enum LogSeparator: String{ public class Logging{ + public static func d(file: String = #file, function: String = #function, line: Int = #line){ + logMessagePrint(separator: .DEBUG, logMessage: "FILE: \(file), FUNCTION: \(function), LINE: \(line)") + } + public static func d(message: String, file: String = #file, function: String = #function, line: Int = #line){ logMessagePrint(separator: .DEBUG, logMessage: "FILE: \(file), FUNCTION: \(function), LINE: \(line), MESSAGE: \(message)") } @@ -36,6 +40,10 @@ public class Logging{ logMessagePrint(separator: .DEBUG, logMessage: "TAG: \(tag), FUNCTION: \(function), LINE: \(line), MESSAGE: \(message)") } + public static func i(file: String = #file, function: String = #function, line: Int = #line){ + logMessagePrint(separator: .INFO, logMessage: "FILE: \(file), FUNCTION: \(function), LINE: \(line)") + } + public static func i(message: String, file: String = #file, function: String = #function, line: Int = #line){ logMessagePrint(separator: .INFO, logMessage: "FILE: \(file), FUNCTION: \(function), LINE: \(line), MESSAGE: \(message)") } @@ -44,6 +52,10 @@ public class Logging{ logMessagePrint(separator: .INFO, logMessage: "TAG: \(tag), FUNCTION: \(function), LINE: \(line), MESSAGE: \(message)") } + public static func w(file: String = #file, function: String = #function, line: Int = #line){ + logMessagePrint(separator: .WARN, logMessage: "FILE: \(file), FUNCTION: \(function), LINE: \(line)") + } + public static func w(message: String, file: String = #file, function: String = #function, line: Int = #line){ logMessagePrint(separator: .WARN, logMessage: "FILE: \(file), FUNCTION: \(function), LINE: \(line), MESSAGE: \(message)") } @@ -52,6 +64,10 @@ public class Logging{ logMessagePrint(separator: .WARN, logMessage: "TAG: \(tag), FUNCTION: \(function), LINE: \(line), MESSAGE: \(message)") } + public static func e(file: String = #file, function: String = #function, line: Int = #line){ + logMessagePrint(separator: .ERROR, logMessage: "FILE: \(file), FUNCTION: \(function), LINE: \(line)") + } + public static func e(message: String, file: String = #file, function: String = #function, line: Int = #line){ logMessagePrint(separator: .ERROR, logMessage: "FILE: \(file), FUNCTION: \(function), LINE: \(line), MESSAGE: \(message)") }