Skip to content
This repository has been archived by the owner on Mar 30, 2022. It is now read-only.

Commit

Permalink
fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
ParkWoocheol committed Dec 23, 2016
1 parent 77e16d6 commit 1f6c06e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 17 deletions.
2 changes: 1 addition & 1 deletion SimpleLog-Swift.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Pod::Spec.new do |s|
s.name = 'SimpleLog-Swift'
s.version = '0.2.0'
s.version = '0.3.0'
s.summary = 'Simple Log for Swift by Park, Woocheol'


Expand Down
35 changes: 19 additions & 16 deletions SimpleLog-Swift/Classes/Logging.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,40 +28,43 @@ public enum LogSeparator: String{

public class Logging{

public static func d(message: String, function: String = #function, line: Int = #line){
logMessagePrint(separator: .DEBUG, logMessage: "FUNCTION: \(function), LINE: \(line), MESSAGE: \(message)")
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)")
}

public static func d(tag: String, message: String, line: Int = #line){
logMessagePrint(separator: .DEBUG, logMessage: "TAG: \(tag), LINE: \(line), MESSAGE: \(message)")
public static func d(tag: String, message: String,function: String = #function, line: Int = #line){
logMessagePrint(separator: .DEBUG, logMessage: "TAG: \(tag), FUNCTION: \(function), LINE: \(line), MESSAGE: \(message)")
}

public static func i(message: String, function: String = #function, line: Int = #line){
logMessagePrint(separator: .INFO, logMessage: "FUNCTION: \(function), LINE: \(line), MESSAGE: \(message)")
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)")
}

public static func i(tag: String, message: String, line: Int = #line){
logMessagePrint(separator: .INFO, logMessage: "TAG: \(tag), LINE: \(line), MESSAGE: \(message)")
public static func i(tag: String, message: String,function: String = #function, line: Int = #line){
logMessagePrint(separator: .INFO, logMessage: "TAG: \(tag), FUNCTION: \(function), LINE: \(line), MESSAGE: \(message)")
}

public static func w(message: String, function: String = #function, line: Int = #line){
logMessagePrint(separator: .WARN, logMessage: "FUNCTION: \(function), LINE: \(line), MESSAGE: \(message)")
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)")
}

public static func w(tag: String, message: String, line: Int = #line){
logMessagePrint(separator: .WARN, logMessage: "TAG: \(tag), LINE: \(line), MESSAGE: \(message)")
public static func w(tag: String, message: String,function: String = #function, line: Int = #line){
logMessagePrint(separator: .WARN, logMessage: "TAG: \(tag), FUNCTION: \(function), LINE: \(line), MESSAGE: \(message)")
}

public static func e(message: String, function: String = #function, line: Int = #line){
logMessagePrint(separator: .ERROR, logMessage: "FUNCTION: \(function), LINE: \(line), MESSAGE: \(message)")
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)")
}

public static func e(tag: String, message: String, line: Int = #line){
logMessagePrint(separator: .ERROR, logMessage: "TAG: \(tag), LINE: \(line), MESSAGE: \(message)")
public static func e(tag: String, message: String,function: String = #function, line: Int = #line){
logMessagePrint(separator: .ERROR, logMessage: "TAG: \(tag), FUNCTION: \(function), LINE: \(line), MESSAGE: \(message)")
}

public static func logMessagePrint(separator: LogSeparator,logMessage: String){
print("| \(separator.rawValue) | \(logMessage)")
}

}



0 comments on commit 1f6c06e

Please sign in to comment.