Add some more info to log message to more easily classify them

This commit is contained in:
Andreas Linde 2012-08-20 13:27:39 +02:00
parent 28c9480da7
commit a0f41065a8
3 changed files with 26 additions and 26 deletions

View File

@ -359,7 +359,7 @@
}
if ([_crashFiles count] > 0) {
BITHockeyLog(@"%i pending crash reports found.", [_crashFiles count]);
BITHockeyLog(@"INFO: %i pending crash reports found.", [_crashFiles count]);
return YES;
} else
return NO;
@ -370,7 +370,7 @@
// slightly delayed startup processing, so we don't keep the first runloop on startup busy for too long
- (void)invokeDelayedProcessing {
BITHockeyLog(@"Start delayed CrashManager processing");
BITHockeyLog(@"INFO: Start delayed CrashManager processing");
if (!_sendingInProgress && [self hasPendingCrashReport]) {
_sendingInProgress = YES;
@ -478,7 +478,7 @@
PLCrashReport *report = [[[PLCrashReport alloc] initWithData:crashData error:&error] autorelease];
if (report == nil) {
BITHockeyLog(@"Could not parse crash report");
BITHockeyLog(@"WARNING: Could not parse crash report");
// we cannot do anything with this report, so delete it
[_fileManager removeItemAtPath:filename error:&error];
[_fileManager removeItemAtPath:[NSString stringWithFormat:@"%@.meta", filename] error:&error];
@ -553,7 +553,7 @@
[self saveSettings];
if (crashes != nil) {
BITHockeyLog(@"Sending crash reports:\n%@", crashes);
BITHockeyLog(@"INFO: Sending crash reports:\n%@", crashes);
[self postXML:[NSString stringWithFormat:@"<crashes>%@</crashes>", crashes]];
}
}
@ -632,14 +632,14 @@
_urlConnection = [[NSURLConnection alloc] initWithRequest:request delegate:self];
if (!_urlConnection) {
BITHockeyLog(@"Sending crash reports could not start!");
BITHockeyLog(@"INFO: Sending crash reports could not start!");
_sendingInProgress = NO;
} else {
if (self.delegate != nil && [self.delegate respondsToSelector:@selector(crashManagerWillSendCrashReport:)]) {
[self.delegate crashManagerWillSendCrashReport:self];
}
BITHockeyLog(@"Sending crash reports started.");
BITHockeyLog(@"INFO: Sending crash reports started.");
}
}
@ -681,7 +681,7 @@
mutabilityOption:NSPropertyListMutableContainersAndLeaves
format:nil
errorDescription:NULL];
BITHockeyLog(@"Received API response: %@", response);
BITHockeyLog(@"INFO: Received API response: %@", response);
if (self.delegate != nil && [self.delegate respondsToSelector:@selector(crashManagerDidFinishSendingCrashReport:)]) {
[self.delegate crashManagerDidFinishSendingCrashReport:self];

View File

@ -131,12 +131,12 @@
- (void)startManager {
if (!_validAppIdentifier) return;
BITHockeyLog(@"Starting HockeyManager");
BITHockeyLog(@"INFO: Starting HockeyManager");
_startManagerIsInvoked = YES;
// start CrashManager
if (![self isCrashManagerDisabled]) {
BITHockeyLog(@"Start CrashManager");
BITHockeyLog(@"INFO: Start CrashManager");
if (_updateURL) {
[_crashManager setUpdateURL:_updateURL];
}
@ -145,7 +145,7 @@
// Setup UpdateManager
if (![self isUpdateManagerDisabled]) {
BITHockeyLog(@"Start UpdateManager with small delay");
BITHockeyLog(@"INFO: Start UpdateManager with small delay");
if (_updateURL) {
[_updateManager setUpdateURL:_updateURL];
}
@ -195,17 +195,17 @@
_startManagerIsInvoked = NO;
if (_validAppIdentifier) {
BITHockeyLog(@"Setup CrashManager");
BITHockeyLog(@"INFO: Setup CrashManager");
_crashManager = [[BITCrashManager alloc] initWithAppIdentifier:_appIdentifier];
_crashManager.delegate = _delegate;
BITHockeyLog(@"Setup UpdateManager");
BITHockeyLog(@"INFO: Setup UpdateManager");
_updateManager = [[BITUpdateManager alloc] initWithAppIdentifier:_appIdentifier isAppStoreEnvironemt:_appStoreEnvironment];
_updateManager.delegate = _delegate;
// Only if JMC is part of the project
if ([[self class] isJMCPresent]) {
BITHockeyLog(@"Setup JMC");
BITHockeyLog(@"INFO: Setup JMC");
[_updateManager setCheckForTracker:YES];
[_updateManager addObserver:self forKeyPath:@"trackerConfig" options:0 context:nil];
[[self class] disableJMCCrashReporter];

View File

@ -82,7 +82,7 @@
#pragma mark - private
- (void)reportError:(NSError *)error {
BITHockeyLog(@"Error: %@", [error localizedDescription]);
BITHockeyLog(@"ERROR: %@", [error localizedDescription]);
_lastCheckFailed = YES;
// only show error if we enable that
@ -310,7 +310,7 @@
if ([UIWindow instancesRespondToSelector:@selector(rootViewController)]) {
if ([window rootViewController]) {
visibleWindow = window;
BITHockeyLog(@"UIWindow with rootViewController found: %@", visibleWindow);
BITHockeyLog(@"INFO: UIWindow with rootViewController found: %@", visibleWindow);
break;
}
}
@ -433,7 +433,7 @@
}
if (_currentHockeyViewController) {
BITHockeyLog(@"update view already visible, aborting");
BITHockeyLog(@"INFO: Update view already visible, aborting");
return;
}
@ -698,7 +698,7 @@
// build request & send
NSString *url = [NSString stringWithFormat:@"%@%@", _updateURL, parameter];
BITHockeyLog(@"sending api request to %@", url);
BITHockeyLog(@"INFO: Sending api request to %@", url);
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:url] cachePolicy:1 timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
@ -722,7 +722,7 @@
userInfo:[NSDictionary dictionaryWithObjectsAndKeys:@"Server returned empty response.", NSLocalizedDescriptionKey, nil]]];
return;
} else {
BITHockeyLog(@"Received API response: %@", responseString);
BITHockeyLog(@"INFO: Received API response: %@", responseString);
NSString *token = [[feedDict objectForKey:@"authcode"] lowercaseString];
failed = NO;
if ([[self authenticationToken] compare:token] == NSOrderedSame) {
@ -742,7 +742,7 @@
}
} else {
// different token, block this version
BITHockeyLog(@"AUTH FAILURE: %@", [self authenticationToken]);
BITHockeyLog(@"INFO: AUTH FAILURE: %@", [self authenticationToken]);
// store the new data
[[NSUserDefaults standardUserDefaults] setObject:[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"] forKey:kBITUpdateAuthorizedVersion];
@ -780,7 +780,7 @@
// do we need to update?
if (![self shouldCheckForUpdates] && !_currentHockeyViewController) {
BITHockeyLog(@"update not needed right now");
BITHockeyLog(@"INFO: Update not needed right now");
self.checkInProgress = NO;
return;
}
@ -810,7 +810,7 @@
// build request & send
NSString *url = [NSString stringWithFormat:@"%@%@", _updateURL, parameter];
BITHockeyLog(@"sending api request to %@", url);
BITHockeyLog(@"INFO: Sending api request to %@", url);
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:url] cachePolicy:1 timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
@ -830,7 +830,7 @@
if (_isAppStoreEnvironment) return NO;
if (!self.isUpdateAvailable) {
BITHockeyLog(@"Warning: No update available. Aborting.");
BITHockeyLog(@"WARNING: No update available. Aborting.");
return NO;
}
@ -848,9 +848,9 @@
NSString *hockeyAPIURL = [NSString stringWithFormat:@"%@api/2/apps/%@?format=plist%@", _updateURL, [self encodedAppIdentifier], extraParameter];
NSString *iOSUpdateURL = [NSString stringWithFormat:@"itms-services://?action=download-manifest&url=%@", [hockeyAPIURL bit_URLEncodedString]];
BITHockeyLog(@"API Server Call: %@, calling iOS with %@", hockeyAPIURL, iOSUpdateURL);
BITHockeyLog(@"INFO: API Server Call: %@, calling iOS with %@", hockeyAPIURL, iOSUpdateURL);
BOOL success = [[UIApplication sharedApplication] openURL:[NSURL URLWithString:iOSUpdateURL]];
BITHockeyLog(@"System returned: %d", success);
BITHockeyLog(@"INFO: System returned: %d", success);
return success;
}
@ -884,7 +884,7 @@
// begin the startup process
- (void)startManager {
BITHockeyLog(@"Start UpdateManager");
BITHockeyLog(@"INFO: Start UpdateManager");
if ([self expiryDateReached]) return;
@ -946,7 +946,7 @@
if ([self.receivedData length]) {
NSString *responseString = [[[NSString alloc] initWithBytes:[_receivedData bytes] length:[_receivedData length] encoding: NSUTF8StringEncoding] autorelease];
BITHockeyLog(@"Received API response: %@", responseString);
BITHockeyLog(@"INFO: Received API response: %@", responseString);
id json = [self parseJSONResultString:responseString];
self.trackerConfig = (([self checkForTracker] && [[json valueForKey:@"tracker"] isKindOfClass:[NSDictionary class]]) ? [json valueForKey:@"tracker"] : nil);