From 0f6a80a3bea404f2b41c4846633908cef019289e Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Tue, 15 Aug 2023 13:47:31 -0500 Subject: [PATCH] added debug logic Signed-off-by: Matt Bruce --- VDS/Classes/BundleManager.swift | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/VDS/Classes/BundleManager.swift b/VDS/Classes/BundleManager.swift index 50537c0d..c5b90dd4 100644 --- a/VDS/Classes/BundleManager.swift +++ b/VDS/Classes/BundleManager.swift @@ -9,6 +9,14 @@ import Foundation import UIKit +public func DebugLog(_ message: String, file: String = #file, line: Int = #line, function: String = #function) { + #if DEBUG + let path = (file as NSString).lastPathComponent + // using print because NSLog crashes when passing certain optionals + print("[\(path)] \(function) [Line \(line)] : \(message)") + #endif +} + /// Bundle Manager keeps all bundles together for ease of use for searching within any of them for a specific asset public class BundleManager { public static var shared = BundleManager()