-
Notifications
You must be signed in to change notification settings - Fork 95
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
Fix device logs #4163
base: master
Are you sure you want to change the base?
Fix device logs #4163
Conversation
@@ -97,7 +97,7 @@ extension DashboardCarPlaySceneDelegate: CPTemplateApplicationDashboardSceneDele | |||
} | |||
|
|||
func templateApplicationDashboardScene(_ templateApplicationDashboardScene: CPTemplateApplicationDashboardScene, didDisconnect dashboardController: CPDashboardController, from window: UIWindow) { | |||
NSLog("[CarPlay] DashboardCarPlaySceneDelegate didDisconnect") | |||
// OALog("[CarPlay] DashboardCarPlaySceneDelegate didDisconnect") |
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.
?
Sources/AppHost/OALog.mm
Outdated
+ (NSString *) getFormattedTimestampByDate:(NSDate *)date | ||
{ | ||
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; |
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.
use lazy load for NSDateFormatter
Sources/AppHost/OALog.mm
Outdated
return @""; | ||
//most common format. don't write | ||
//return @"Interactive"; |
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.
?
Sources/AppHost/OALog.mm
Outdated
{ | ||
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; | ||
[dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss.SSS"]; |
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.
Use more precision SSSS
@@ -4072,15 +4072,15 @@ - (void) startProgress | |||
|
|||
- (void) updateProgress:(int)progress | |||
{ | |||
//NSLog(@"Route calculation in progress: %d", progress); | |||
//OALog(@"Route calculation in progress: %d", progress); |
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.
remove
Sources/Data/OAMapStyleSettings.mm
Outdated
@@ -155,7 +156,7 @@ - (void)buildParameters:(NSString *)styleName | |||
{ | |||
NSString *name = resolvedMapStyle->getStringById(p->getNameId()).toNSString(); | |||
|
|||
//NSLog(@"name = %@ title = %@ decs = %@ category = %@", name, p->getTitle().toNSString(), p->getDescription().toNSString(), p->getCategory().toNSString()); | |||
//OALog(@"name = %@ title = %@ decs = %@ category = %@", name, p->getTitle().toNSString(), p->getDescription().toNSString(), p->getCategory().toNSString()); |
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.
remove
Sources/OsmEdit/OAOsmBugsDBHelper.m
Outdated
@@ -9,6 +9,7 @@ | |||
#import "OAOsmBugsDBHelper.h" | |||
#import "OABackupHelper.h" | |||
|
|||
|
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.
?
@@ -9,6 +9,7 @@ | |||
#import <XCTest/XCTest.h> | |||
#import "OARouteProvider.h" | |||
#import "OARouteCalculationParams.h" | |||
#import "OALog.h" |
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.
For the Test Target, do we definitely need to use file writing? OALog
Founded some trouble with writing log file on device.
Deleted old log in random order. Sometimes deleted the latest log. Fixed.
it didn't write many logs to the file. From Swift and C++ by example. Fixed.
old Dec 02, 2024 22:11.log
new Dec 02, 2024 22:02:19.log
Added seconds to file name. Without this, if the user starts the application twice in a minute, the second file will overwrite the first.
Improved New OALog version output. Now it prints more information about thread:
OALog("Hello world")
PS: most changes are in files
OALog.h
OALog.m
OsmAndAppImpl.mm
OALogWrapper.swift