mattermost-community/mattermost-plugin-skype4business

Log requests being sent to the skype server

Closed this issue · 5 comments

Troubleshooting issues with connecting to on-prem skype4business servers has consistently proven to be difficult. It would be useful to be able to view the raw requests being sent out. The task here is to log the request or important bits of the request to the server logs.

Issue created from a Mattermost message by @muratbayan.

We would ideally want any request going to the skype server to be logged and include the URL, body, and headers.

An approximation of the new meeting request in curl form:

curl --header "Content-Type: application/json" \
  --header "Authorization: Bearer mySfBToken" \ 
  --header "Accept: application/json" \ 
  --request POST \
  --data '{"subject":"Meeting created by the Mattermost Skype for Business plugin", "automaticLeaderAssignment":"SameEnterprise"}' \
  https://mySfBServerURL/new_meeting

I can do it :)

@kosgrz Great! Maybe make this an optional config setting so as to not spam the logs of any customer using the plugin?

Also not sure about the log level to use. @muratbayan Of the four log levels, what do you think is the most appropriate for the customers trying to debug this?

@mickmister I think it's a very good idea to make this feature optional. Requests logs're of decent size, especially the "Authorization" header's values are VERY long and can really spam logs.

@kosgrz Any updates on this?
Currently having trouble connecting it with our On Prem SfB, as the plugin is trying to connect to our external Skype for Business Server and I'd like to see at what point he gets the address for our external server.