mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
Log not truncated in syslog
This commit is contained in:
parent
6c8284f169
commit
06bdf251f0
1 changed files with 14 additions and 2 deletions
|
|
@ -114,8 +114,20 @@ void linphone_iphone_log_handler(const char *domain, OrtpLogLevel lev, const cha
|
|||
case ORTP_LOGLEV_END:
|
||||
return;
|
||||
}
|
||||
os_log_with_type(log, type, "%{public}s/%{public}s", domain,
|
||||
[formatedString stringByReplacingOccurrencesOfString:@"\r\n" withString:@"\n"].UTF8String);
|
||||
if ([formatedString containsString:@"\n"]) {
|
||||
NSArray *myWords = [[formatedString stringByReplacingOccurrencesOfString:@"\r\n" withString:@"\n"]
|
||||
componentsSeparatedByString:@"\n"];
|
||||
for (int i = 0; i < myWords.count; i++) {
|
||||
NSString *tab = i > 0 ? @"\t" : @"";
|
||||
if (((NSString *)myWords[i]).length > 0) {
|
||||
os_log_with_type(log, type, "%{public}s%{public}s", tab.UTF8String,
|
||||
((NSString *)myWords[i]).UTF8String);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
os_log_with_type(log, type, "%{public}s/%{public}s", domain,
|
||||
[formatedString stringByReplacingOccurrencesOfString:@"\r\n" withString:@"\n"].UTF8String);
|
||||
}
|
||||
} else {
|
||||
int lvl = ASL_LEVEL_NOTICE;
|
||||
switch (lev) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue