From version < 22.1 >
edited by Sylvain Berfini
on 2017/11/15 14:17
To version < 22.2 >
edited by Admin Admin
on 2017/12/19 17:00
< >
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -xwiki:XWiki.sylvain
1 +xwiki:XWiki.BenjaminReis
Content
... ... @@ -45,7 +45,7 @@
45 45  Put in your code at the launching of the app :
46 46  
47 47  {{code language="Objective-C"}}
48 -linphone_core_enable_logs_with_cb(your_log_handler);
48 +linphone_core_set_log_handler(your_log_handler);
49 49  {{/code}}
50 50  
51 51  This will make the liblinphone logs to call your_log_handler and so be processes as a log from your app.
... ... @@ -59,7 +59,8 @@
59 59  Here is a little example on how to manage liblinphone log into an IOS app :
60 60  
61 61  {{code language="Objective-C"}}
62 - NSString *format = [[NSString alloc] initWithUTF8String:fmt];
62 +void linphone_iphone_log_handler(const char *domain, OrtpLogLevel lev, const char *fmt, va_list args) {
63 +NSString *format = [[NSString alloc] initWithUTF8String:fmt];
63 63   NSString *formatedString = [[NSString alloc] initWithFormat:format arguments:args];
64 64   NSString *lvl;
65 65  
... ... @@ -102,6 +102,7 @@
102 102   } else {
103 103   NSLog(@"[%@] %@", lvl, [formatedString stringByReplacingOccurrencesOfString:@"\r\n" withString:@"\n"]);
104 104   }
106 +}
105 105  {{/code}}
106 106  
107 107