-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
300 additions
and
48 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
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,35 @@ | ||
// | ||
// SPMockLoggerDelegate.h | ||
// Snowplow | ||
// | ||
// Copyright (c) 2013-2022 Snowplow Analytics Ltd. All rights reserved. | ||
// | ||
// This program is licensed to you under the Apache License Version 2.0, | ||
// and you may not use this file except in compliance with the Apache License | ||
// Version 2.0. You may obtain a copy of the Apache License Version 2.0 at | ||
// http://www.apache.org/licenses/LICENSE-2.0. | ||
// | ||
// Unless required by applicable law or agreed to in writing, | ||
// software distributed under the Apache License Version 2.0 is distributed on | ||
// an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either | ||
// express or implied. See the Apache License Version 2.0 for the specific | ||
// language governing permissions and limitations there under. | ||
// | ||
// Authors: Alex Benini, Matus Tomlein | ||
// License: Apache License Version 2.0 | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
#import "SPLoggerDelegate.h" | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
@interface SPMockLoggerDelegate : NSObject <SPLoggerDelegate> | ||
|
||
@property (nonatomic) NSMutableArray<NSString *> *errorLogs; | ||
@property (nonatomic) NSMutableArray<NSString *> *debugLogs; | ||
@property (nonatomic) NSMutableArray<NSString *> *verboseLogs; | ||
|
||
@end | ||
|
||
NS_ASSUME_NONNULL_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,47 @@ | ||
// | ||
// SPMockLoggerDelegate.m | ||
// Snowplow | ||
// | ||
// Copyright (c) 2013-2022 Snowplow Analytics Ltd. All rights reserved. | ||
// | ||
// This program is licensed to you under the Apache License Version 2.0, | ||
// and you may not use this file except in compliance with the Apache License | ||
// Version 2.0. You may obtain a copy of the Apache License Version 2.0 at | ||
// http://www.apache.org/licenses/LICENSE-2.0. | ||
// | ||
// Unless required by applicable law or agreed to in writing, | ||
// software distributed under the Apache License Version 2.0 is distributed on | ||
// an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either | ||
// express or implied. See the Apache License Version 2.0 for the specific | ||
// language governing permissions and limitations there under. | ||
// | ||
// Authors: Alex Benini, Matus Tomlein | ||
// License: Apache License Version 2.0 | ||
// | ||
|
||
#import "SPMockLoggerDelegate.h" | ||
|
||
@implementation SPMockLoggerDelegate | ||
|
||
- (instancetype)init { | ||
if (self = [super init]) { | ||
self.errorLogs = [NSMutableArray new]; | ||
self.debugLogs = [NSMutableArray new]; | ||
self.verboseLogs = [NSMutableArray new]; | ||
} | ||
return self; | ||
} | ||
|
||
- (void)debug:(nonnull NSString *)tag message:(nonnull NSString *)message { | ||
[self.debugLogs addObject:message]; | ||
} | ||
|
||
- (void)error:(nonnull NSString *)tag message:(nonnull NSString *)message { | ||
[self.errorLogs addObject:message]; | ||
} | ||
|
||
- (void)verbose:(nonnull NSString *)tag message:(nonnull NSString *)message { | ||
[self.verboseLogs addObject:message]; | ||
} | ||
|
||
@end |
Oops, something went wrong.