-
Notifications
You must be signed in to change notification settings - Fork 298
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
CBL-5396: Use os_log instead of NSLog for Console Log #3323
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); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There are different types of os_log function based on the log level. I think we should use those functions. What is .NET using? |
||
} | ||
|
||
@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"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is "OSLogging"? Where does it appear in the log? |
||
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 !!!"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For this one we can use NSLog, I guessed or change it to assertion instead of logging. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. changed to assert |
||
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.ios
and the category now represents a domain (CBL)