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

TracksLogWarn messages aren't shown in console in the client app #262

Closed
jaclync opened this issue Aug 30, 2023 · 0 comments · Fixed by #263
Closed

TracksLogWarn messages aren't shown in console in the client app #262

jaclync opened this issue Aug 30, 2023 · 0 comments · Fixed by #263
Assignees
Labels

Comments

@jaclync
Copy link
Contributor

jaclync commented Aug 30, 2023

Recently, we noticed a Tracks event wasn't actually tracked due to a validation error that wasn't logged anywhere in the console p1693362956666449/1692625489.705669-slack-C039133E1M3.

BOOL isValid = [tracksEvent validateObject:&error];
if (!isValid) {
TracksLogWarn(@"Error when validating TracksEvent: %@", error);

Upon inspection, TracksLoggingClass() is nil:

static Class<TracksLoggingConfiguration> result = nil;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
#if SWIFT_PACKAGE
Class loggingClass = NSClassFromString(@"AutomatticTracksModel.TracksLogging");
#else
Class loggingClass = NSClassFromString(@"TracksLogging");
#endif
if ([loggingClass conformsToProtocol: @protocol(TracksLoggingConfiguration)]) {
result = loggingClass;
}
});
return result;

It'd be great to fix this so that we can detect any validation errors during development.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant