summaryrefslogtreecommitdiff
path: root/SmartDeviceLink
diff options
context:
space:
mode:
authorJoel Fischer <joeljfischer@gmail.com>2016-08-29 16:13:36 -0400
committerJoel Fischer <joeljfischer@gmail.com>2016-08-29 16:13:36 -0400
commit204f636612aa7b9e90c90fcecc1f14e03323e9ef (patch)
treec189ee754b9e4d4ac8a42e240bac532c0f90964b /SmartDeviceLink
parent9f7cecca97395424d83cd9e1cb23188b19d70054 (diff)
downloadsdl_ios-204f636612aa7b9e90c90fcecc1f14e03323e9ef.tar.gz
Apply logging settings to SDL
* Fix a bug in SDLDebugTool
Diffstat (limited to 'SmartDeviceLink')
-rw-r--r--SmartDeviceLink/SDLDebugTool.m3
-rw-r--r--SmartDeviceLink/SDLLifecycleManager.h1
-rw-r--r--SmartDeviceLink/SDLLifecycleManager.m24
3 files changed, 8 insertions, 20 deletions
diff --git a/SmartDeviceLink/SDLDebugTool.m b/SmartDeviceLink/SDLDebugTool.m
index 19666d177..ef0c16680 100644
--- a/SmartDeviceLink/SDLDebugTool.m
+++ b/SmartDeviceLink/SDLDebugTool.m
@@ -7,7 +7,6 @@
#import "SDLRPCMessage.h"
#import "SDLSiphonServer.h"
-#define LOG_ERROR_ENABLED
@interface SDLDebugTool ()
@@ -42,7 +41,7 @@
static SDLDebugTool *sharedTool = nil;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
-
+ sharedTool = [[self alloc] init];
});
return sharedTool;
diff --git a/SmartDeviceLink/SDLLifecycleManager.h b/SmartDeviceLink/SDLLifecycleManager.h
index 826341a18..ae63f92d2 100644
--- a/SmartDeviceLink/SDLLifecycleManager.h
+++ b/SmartDeviceLink/SDLLifecycleManager.h
@@ -60,7 +60,6 @@ typedef void (^SDLManagerReadyBlock)(BOOL success, NSError *_Nullable error);
@property (strong, nonatomic, readonly) SDLNotificationDispatcher *notificationDispatcher;
@property (strong, nonatomic, readonly) SDLResponseDispatcher *responseDispatcher;
-
@property (strong, nonatomic, readonly) SDLStateMachine *lifecycleStateMachine;
// Deprecated internal proxy object
diff --git a/SmartDeviceLink/SDLLifecycleManager.m b/SmartDeviceLink/SDLLifecycleManager.m
index d9cc0b929..6df4c35cb 100644
--- a/SmartDeviceLink/SDLLifecycleManager.m
+++ b/SmartDeviceLink/SDLLifecycleManager.m
@@ -115,7 +115,11 @@ SDLLifecycleState *const SDLLifecycleStateReady = @"Ready";
- (void)startWithReadyHandler:(SDLManagerReadyBlock)readyHandler {
self.readyHandler = [readyHandler copy];
-
+
+ // Set up our logging capabilities based on the config
+ [self.class sdl_updateLoggingWithFlags:self.configuration.lifecycleConfig.logFlags];
+
+ // Start up the internal proxy object
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
if (self.configuration.lifecycleConfig.tcpDebugMode) {
@@ -302,10 +306,6 @@ SDLLifecycleState *const SDLLifecycleStateReady = @"Ready";
[self.delegate hmiLevel:[SDLHMILevel NONE] didChangeToLevel:self.hmiLevel];
}
-- (void)didEnterStateError {
-
-}
-
- (void)didEnterStateUnregistering {
SDLUnregisterAppInterface *unregisterRequest = [SDLRPCRequestFactory buildUnregisterAppInterfaceWithCorrelationID:[self sdl_getNextCorrelationId]];
@@ -420,18 +420,8 @@ SDLLifecycleState *const SDLLifecycleStateReady = @"Ready";
return YES;
}
-+ (void)updateLoggingWithFlags:(SDLLogging)logFlags {
- if ((logFlags & SDLLoggingNone) == SDLLoggingNone) {
- [SDLDebugTool disable];
- [SDLDebugTool disableDebugToLogFile];
-
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- [SDLProxy disableSiphonDebug];
-#pragma clang diagnostic pop
-
- return;
- }
++ (void)sdl_updateLoggingWithFlags:(SDLLogging)logFlags {
+ [SDLDebugTool disable];
if ((logFlags & SDLLoggingConsole) == SDLLoggingConsole) {
[SDLDebugTool enable];