File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55// Created by Magesh K on 28/06/26.
66// Copyright © 2026 SideStore. All rights reserved.
77//
8+ import Foundation
89
910public enum AltSignLogging {
1011 public private( set) static var isLoggingEnabled = false
@@ -14,14 +15,23 @@ public enum AltSignLogging {
1415 }
1516}
1617
18+ private func getTag( level: String ) -> String {
19+ let formatter = DateFormatter ( )
20+ formatter. dateFormat = " yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z' "
21+ formatter. timeZone = TimeZone ( secondsFromGMT: 0 )
22+ formatter. locale = Locale ( identifier: " en_US_POSIX " )
23+ let timestamp = formatter. string ( from: Date ( ) )
24+ return " \( timestamp) \( level) : "
25+ }
26+
1727@inline ( __always)
1828public func debugLog( _ text: @autoclosure ( ) -> String ) {
19- print ( text ( ) )
29+ print ( " \( getTag ( level : " DEBUG " ) ) \( text ( ) ) " )
2030}
2131
2232@inline ( __always)
2333public func verboseLog( _ text: @autoclosure ( ) -> String ) {
2434 if AltSignLogging . isLoggingEnabled {
25- print ( text ( ) )
35+ print ( " \( getTag ( level : " TRACE " ) ) \( text ( ) ) " )
2636 }
2737}
You can’t perform that action at this time.
0 commit comments