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

Consolidate logging #19

Closed
wants to merge 6 commits into from

Conversation

marinaserranomontes
Copy link
Contributor

Pull request checklist

  • All tests pass. Demo project builds and runs.
  • I have resolved any merge conflicts. Confirmation: ____

This fixes issue #___.

What's in this pull request?

...

[loggingWrapper.logger logEventAction:KLogActionStopScreensharing
variation:KLogVariationAttempt
completion:nil];
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Under screen sharing, it will log both. Should we put KLogActionStopPublishing to the else branch?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Lucashuang0802 in Android, we are following the approach below:

  • start/stop publishing means starting to share your media independently on if it is screen or not.
  • start/stop screensharing means you are publishing and also, it is the screensharing case.

So the stopPublishing log should not be in the else, it is covering the ss case as well. wdyt?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does not make too much sense to me as it's the same event but different capture type. and I do believe publishing and screen-sharing are same but capturing from a different feed. that will probably create confusion.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After review it, I agree. Maybe, it could be confused, so, we are going to log:

  • start/stop publishing media (camera stream)
  • start/stop screensharing

I will add the modification to android core as well. thanks!!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

static NSString* const KLogClientVersion = @"ios-vsol-2.0.0";
static NSString* const kLogComponentIdentifier = @"OTAcceleratorCore";
static NSString* const KLogClientVersion = @"ios-vsol-1.0.4";
static NSString* const kLogComponentIdentifier = @"acceleratorCore";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use upper case K for making it consistent.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

NSLog(@"%s: %@", __PRETTY_FUNCTION__, error);
}
[subscriberObject.subscriberView removeFromSuperview];
[subscriberObject.subscriberView clean];
subscriberObject.subscriber = nil;
subscriberObject.subscriberView = nil;
[loggingWrapper.logger logEventAction:KLogActionRemoveRemote
variation:KLogVariationSuccess
completion:nil];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here, we will have a situation to log success and failure the same time.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Lucashuang0802 you are right, the error is not a return. I will add the success case in the else.

connectionId:session.connection.connectionId
partnerId:@([self.session.apiKey integerValue])];
[loggingWrapper.logger logEventAction:KLogActionConnect
variation:KLogVariationSuccess
completion:nil];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a duplicate log which is captured in connect method. That's why I only use StartComm and StopComm

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right. Let us use the success case in the callback, because we have the connectionId, so the log will be more complete.

[loggingWrapper.logger logEventAction:KLogActionStartScreensharing
variation:KLogVariationFailure
completion:nil];
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Under screen sharing, it will log both. Should we put KLogActionStartPublishing to the else branch?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same we commented for multiparty case

[[LoggingWrapper sharedInstance].logger logEventAction:KLogActionStartScreensharing
variation:KLogVariationSuccess
completion:nil];
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Under screen sharing, it will log both. Should we put KLogActionStartPublishing to the else branch?

variation:KLogVariationFailure
completion:nil];
}
return subscriberError;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method, we did not log success.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the success case is in the callback: subscriberDidConnectToStream, wdyt?

@Lucashuang0802
Copy link
Contributor

Let's see whether we can simplify the entry a little bit as I have fixed this one already. Mostly, issues are on text-chat and annotation.

@Lucashuang0802 Lucashuang0802 changed the title Fixing logging Consolidate logging Feb 18, 2017

if (self.screenSharingView) {
[loggingWrapper.logger logEventAction:KLogActionStopScreensharing
variation:KLogVariationAttempt
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is it the attempt action here?

if (!_publisher) return;
_publisher.publishAudio = publishAudio;
[[MultiPartyLoggingWrapper sharedInstance].logger logEventAction:KLogActionEnableLocalMedia
variation:KLogVariationSuccess
completion:nil];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For cases like this, why do we even have attempt if we don't have a case to fail?

@Lucashuang0802
Copy link
Contributor

Please re-consider to simplify logging entries as it increases the codebase dramatically. Also, the client and backend also have the log. Why do we need to have so many entries that are redundant?

@marinaserranomontes
Copy link
Contributor Author

@Lucashuang0802 please note, we are adding client logs for the public API methods in the core. The native clients and servers are logging different actions.
It could be useful to know the use of the libraries and as well for debugging.

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

Successfully merging this pull request may close these issues.

None yet

2 participants