Skip to content
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

Separate public utils from private utils appropriately #913

Merged
merged 3 commits into from
Jun 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Analytics.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,8 @@
EADEB89B1DECD12B005322DA /* SEGStorage.h */,
EADEB88A1DECD12B005322DA /* SEGTrackPayload.h */,
EADEB88B1DECD12B005322DA /* SEGTrackPayload.m */,
EADEB88F1DECD12B005322DA /* SEGAnalyticsUtils.h */,
EADEB8901DECD12B005322DA /* SEGAnalyticsUtils.m */,
);
path = Classes;
sourceTree = "<group>";
Expand All @@ -371,8 +373,6 @@
EADEB88E1DECD12B005322DA /* NSData+SEGGZIP.m */,
EADEB8781DECD12B005322DA /* SEGAES256Crypto.h */,
EADEB8791DECD12B005322DA /* SEGAES256Crypto.m */,
EADEB88F1DECD12B005322DA /* SEGAnalyticsUtils.h */,
EADEB8901DECD12B005322DA /* SEGAnalyticsUtils.m */,
EADEB8911DECD12B005322DA /* SEGFileStorage.h */,
EADEB8921DECD12B005322DA /* SEGFileStorage.m */,
EADEB8841DECD12B005322DA /* SEGIntegrationsManager.h */,
Expand Down
10 changes: 10 additions & 0 deletions Analytics/Classes/SEGAnalyticsUtils.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

// Logging

void SEGSetShowDebugLogs(BOOL showDebugLogs);
void SEGLog(NSString *format, ...);

NS_ASSUME_NONNULL_END
23 changes: 23 additions & 0 deletions Analytics/Classes/SEGAnalyticsUtils.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#import "SEGAnalyticsUtils.h"
#import "SEGAnalytics.h"

static BOOL kAnalyticsLoggerShowLogs = NO;

// Logging

void SEGSetShowDebugLogs(BOOL showDebugLogs)
{
kAnalyticsLoggerShowLogs = showDebugLogs;
}

void SEGLog(NSString *format, ...)
{
if (!kAnalyticsLoggerShowLogs)
return;

va_list args;
va_start(args, format);
NSLogv(format, args);
va_end(args);
}

2 changes: 1 addition & 1 deletion Analytics/Classes/SEGSegmentIntegration.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#import <UIKit/UIKit.h>
#import "SEGAnalytics.h"
#import "SEGAnalyticsUtils.h"
#import "SEGUtils.h"
#import "SEGSegmentIntegration.h"
#import "SEGReachability.h"
#import "SEGHTTPClient.h"
Expand Down
50 changes: 0 additions & 50 deletions Analytics/Internal/SEGAnalyticsUtils.h

This file was deleted.

Loading