@@ -21,11 +21,7 @@ public struct Logger : @unchecked Sendable {
21
21
}
22
22
23
23
public func log( _ message: OSLogMessage ) {
24
- androidLog ( priority: ANDROID_LOG_DEFAULT, message: message)
25
- }
26
-
27
- public func log( level: OSLogType , _ message: OSLogMessage ) {
28
- androidLog ( priority: ANDROID_LOG_DEFAULT, message: message)
24
+ androidLog ( priority: ANDROID_LOG_INFO, message: message)
29
25
}
30
26
31
27
public func trace( _ message: OSLogMessage ) {
@@ -60,7 +56,7 @@ public struct Logger : @unchecked Sendable {
60
56
androidLog ( priority: ANDROID_LOG_FATAL, message: message)
61
57
}
62
58
63
- public func log( type: OSLogType , message: OSLogMessage ) {
59
+ public func log( level type: OSLogType , _ message: OSLogMessage ) {
64
60
let priority : android_LogPriority
65
61
switch type {
66
62
case . info: priority = ANDROID_LOG_INFO
@@ -75,12 +71,8 @@ public struct Logger : @unchecked Sendable {
75
71
76
72
private func androidLog( priority: android_LogPriority , message: OSLogMessage ) {
77
73
let tag = subsystem. isEmpty && category. isEmpty ? " " : ( subsystem + " / " + category)
78
- tag. withCString { tagPtr in
79
- message. withCString { messagePtr in
80
- //swift_android_log(priority, tagPtr, messagePtr)
81
- __android_log_write ( Int32 ( priority. rawValue) , tagPtr, messagePtr)
82
- }
83
- }
74
+ //swift_android_log(priority, tagPtr, messagePtr)
75
+ __android_log_write ( Int32 ( priority. rawValue) , tag, message)
84
76
}
85
77
}
86
78
0 commit comments