Skip to content

Commit e013a57

Browse files
j2objc-copybaracopybara-github
authored andcommitted
Align the logging format of the IosLoggerBackend with the XLogger.
Replaces the logging handler with a handler that supports the same format as the XLogger. Otherwise only the raw string is logged to console. PiperOrigin-RevId: 591315434
1 parent 2fe427f commit e013a57

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

jre_emul/Classes/com/google/j2objc/util/logging/IOSLogHandler.java

+5-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,11 @@ public String format(LogRecord record) {
122122
private Object nativeLog;
123123

124124
public IOSLogHandler() {
125-
setFormatter(new IOSLogFormatter());
125+
this(new IOSLogFormatter());
126+
}
127+
128+
public IOSLogHandler(Formatter customFormatter) {
129+
setFormatter(customFormatter);
126130
}
127131

128132
@Override

0 commit comments

Comments
 (0)