-
Notifications
You must be signed in to change notification settings - Fork 301
CBL-5396: Use os_log instead of NSLog for Console Log #3323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 2 commits
ed9ecfb
9a03db9
a906642
6895ecd
c139662
4e50ac7
90a540a
e7defe8
96a48a5
04526ca
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -45,7 +45,8 @@ - (void) logWithLevel: (CBLLogLevel)level domain: (CBLLogDomain)domain message: | |
|
|
||
| NSString* levelName = CBLLog_GetLevelName(level); | ||
| NSString* domainName = CBLLog_GetDomainName(domain); | ||
| NSLog(@"CouchbaseLite %@ %@: %@", domainName, levelName, message); | ||
| os_log_t log = os_log_create("CouchbaseLite", "OSDebug"); | ||
| os_log(log, "CouchbaseLite %@ %@: %@", domainName, levelName, message); | ||
|
||
| } | ||
|
|
||
| @end | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -115,7 +115,8 @@ to be done in CBLInit()which is called only once when the first CBLDatabase is c | |
| */ | ||
| + (void) initialize { | ||
| if (self == [CBLDatabase class]) { | ||
| NSLog(@"%@", [CBLVersion userAgent]); | ||
| os_log_t log = os_log_create("CouchbaseLite", "OSLogging"); | ||
|
||
| os_log(log, "%@", [CBLVersion userAgent]); | ||
| // Initialize logging | ||
| CBLAssertNotNil(CBLLog.sharedInstance); | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -40,7 +40,8 @@ - (CBLDictionary*) predict: (CBLDictionary*)input { | |
| NSString* inputWord = [input stringForKey: @"word"]; | ||
|
|
||
| if (!inputWord) { | ||
| NSLog(@"No word input !!!"); | ||
| os_log_t log = os_log_create("CouchbaseLite", "OSLogging"); | ||
| os_log(log, "No word input !!!"); | ||
|
||
| return nil; | ||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is "OSDebug"? Where does it appear in the log?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed to
com.couchbase.lite.iosand the category now represents a domain (CBL)