Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move the logging static methods in FBSession to public FBSettings class
Summary: Create a new class FBSettings, and move to it the methods loggingBehavior and setLoggingBehaviour from FBSession. Test Plan: Ran unit tests Reviewers: clang, jacl, gregschechte, mmarucheck Reviewed By: gregschechte CC: yariv, bhiller Differential Revision: https://phabricator.fb.com/D514198 Task ID: 1146322
- Loading branch information
aydenw
committed
Jul 13, 2012
1 parent
0e7b033
commit ac018ab
Showing
12 changed files
with
139 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/* | ||
* Copyright 2012 Facebook | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
/* | ||
* Constants defining logging behavior. Use with <[FBSettings setLoggingBehavior]>. | ||
*/ | ||
|
||
/*! Log requests from FBRequest* classes */ | ||
extern NSString *const FBLoggingBehaviorFBRequests; | ||
|
||
/*! Log requests from FBURLConnection* classes */ | ||
extern NSString *const FBLoggingBehaviorFBURLConnections; | ||
|
||
/*! Include access token in logging. */ | ||
extern NSString *const FBLoggingBehaviorAccessTokens; | ||
|
||
/*! Log session state transitions. */ | ||
extern NSString *const FBLoggingBehaviorSessionStateTransitions; | ||
|
||
/*! Log performance characteristics */ | ||
extern NSString *const FBLoggingBehaviorPerformanceCharacteristics; | ||
|
||
@interface FBSettings : NSObject | ||
|
||
/*! | ||
@method | ||
@abstract Retrieve the current Facebook SDK logging behavior. | ||
*/ | ||
+ (NSSet *)loggingBehavior; | ||
|
||
/*! | ||
@method | ||
@abstract Set the current Facebook SDK logging behavior. This should consist of strings defined as | ||
constants with FBLogBehavior*, and can be constructed with [NSSet initWithObjects:]. | ||
@param loggingBehavior A set of strings indicating what information should be logged. | ||
*/ | ||
+ (void)setLoggingBehavior:(NSSet *)loggingBehavior; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* | ||
* Copyright 2010 Facebook | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#import "FBSettings.h" | ||
|
||
NSString *const FBLoggingBehaviorFBRequests = @"fb_requests"; | ||
NSString *const FBLoggingBehaviorFBURLConnections = @"fburl_connections"; | ||
NSString *const FBLoggingBehaviorAccessTokens = @"include_access_tokens"; | ||
NSString *const FBLoggingBehaviorSessionStateTransitions = @"state_transitions"; | ||
NSString *const FBLoggingBehaviorPerformanceCharacteristics = @"perf_characteristics"; | ||
|
||
@implementation FBSettings | ||
|
||
static NSSet *g_loggingBehavior; | ||
|
||
+ (NSSet *)loggingBehavior { | ||
return g_loggingBehavior; | ||
} | ||
|
||
+ (void)setLoggingBehavior:(NSSet *)newValue { | ||
[newValue retain]; | ||
[g_loggingBehavior release]; | ||
g_loggingBehavior = newValue; | ||
} | ||
|
||
@end |
Oops, something went wrong.