Skip to content

Instantly share code, notes, and snippets.

@ArchieR7
Created July 7, 2017 02:35
Show Gist options
  • Select an option

  • Save ArchieR7/c3ad7c0d8b10c5c7a6d7ed6114eb6ffe to your computer and use it in GitHub Desktop.

Select an option

Save ArchieR7/c3ad7c0d8b10c5c7a6d7ed6114eb6ffe to your computer and use it in GitHub Desktop.
public func ALogDebug(_ string: Any, file: String = #file, line: Int = #line) {
print("📒 \(file.components(separatedBy: "/").last ?? "")[\(line)]: \(string)")
}
public func ALogWarn(_ string: Any, file: String = #file, line: Int = #line) {
print("⚠️ \(file.components(separatedBy: "/").last ?? "")[\(line)]: \(string)")
}
public func ALogInfo(_ string: Any, file: String = #file, line: Int = #line) {
print("ℹ️ \(file.components(separatedBy: "/").last ?? "")[\(line)]: \(string)")
}
public func ALogError(_ string: Any, file: String = #file, line: Int = #line) {
print("🚨 \(file.components(separatedBy: "/").last ?? "")[\(line)]: \(string)")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment