Skip to content

Commit

Permalink
update log formate
Browse files Browse the repository at this point in the history
  • Loading branch information
DamonHu committed Aug 10, 2021
1 parent 24068f1 commit 8805bab
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion pod/ZXKitLogger.swift
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ public class ZXKitLogger {
loggerItem.mCreateDate = Date()

let fileName = (file as NSString).lastPathComponent;
loggerItem.mLogDebugContent = "[File:\(fileName)]:[Line:\(lineNum):[Function:\(funcName)]]-Log:"
loggerItem.mLogDebugContent = "File: \(fileName) -- Line: \(lineNum) -- Function:\(fileName).\(funcName) ----"
loggerItem.mLogContent = log

if self.isSyncConsole {
Expand Down
20 changes: 10 additions & 10 deletions pod/ZXKitLoggerItem.swift
Original file line number Diff line number Diff line change
Expand Up @@ -53,28 +53,28 @@ public class ZXKitLoggerItem {
if ZXKitLogger.isFullLogOut {
switch mLogItemType {
case .info:
return dateStr + " > ✅✅" + mLogDebugContent + "\n" + contentString + "\n"
return dateStr + " ---- ✅✅ ---- " + mLogDebugContent + "\n" + contentString + "\n"
case .warn:
return dateStr + " > ⚠️⚠️" + mLogDebugContent + "\n" + contentString + "\n"
return dateStr + " ---- ⚠️⚠️ ---- " + mLogDebugContent + "\n" + contentString + "\n"
case .error:
return dateStr + " > ❌❌" + mLogDebugContent + "\n" + contentString + "\n"
return dateStr + " ---- ❌❌ ---- " + mLogDebugContent + "\n" + contentString + "\n"
case .privacy:
return dateStr + " > ⛔️⛔️" + mLogDebugContent + "\n" + contentString + "\n"
return dateStr + " ---- ⛔️⛔️ ---- " + mLogDebugContent + "\n" + contentString + "\n"
default:
return dateStr + " > 🖤🖤" + mLogDebugContent + "\n" + contentString + "\n"
return dateStr + " ---- 🖤🖤 ---- " + mLogDebugContent + "\n" + contentString + "\n"
}
} else {
switch mLogItemType {
case .info:
return dateStr + " > ✅✅" + contentString + "\n"
return dateStr + " ---- ✅✅ ---- " + "\n" + contentString + "\n"
case .warn:
return dateStr + " > ⚠️⚠️" + contentString + "\n"
return dateStr + " ---- ⚠️⚠️ ---- " + "\n" + contentString + "\n"
case .error:
return dateStr + " > ❌❌" + contentString + "\n"
return dateStr + " ---- ❌❌ ---- " + "\n" + contentString + "\n"
case .privacy:
return dateStr + " > ⛔️⛔️" + contentString + "\n"
return dateStr + " ---- ⛔️⛔️ ---- " + "\n" + contentString + "\n"
default:
return dateStr + " > 🖤🖤" + contentString + "\n"
return dateStr + " ---- 🖤🖤 ---- " + "\n" + contentString + "\n"
}
}
}
Expand Down

0 comments on commit 8805bab

Please sign in to comment.