Skip to content

Instantly share code, notes, and snippets.

View RunesReader's full-sized avatar
🏠
Working from home

Igor Arsenkin RunesReader

🏠
Working from home
View GitHub Profile
@RunesReader
RunesReader / Debug.swift
Created January 23, 2021 17:58
Debug Log
import Foundation
struct Debug {
static func nslogDebug(_ message: String, function: String = #function, file: String = #file) {
if let range = file.range(of: "([A-z])*.swift", options: String.CompareOptions.regularExpression) {
let fileName = file[range.lowerBound..<range.upperBound]
logDebug(message: "****: \(fileName) \(function) - \(message)")