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

JSON-RPC: make logging of incoming requests optional and configurable #4428

Merged
merged 2 commits into from Mar 15, 2014

Conversation

Montellese
Copy link
Member

As discussed in the forums the first commit makes the logging of incoming JSON-RPC requests optional. For JSON-RPC requests over HTTP there is still a debug log message from the webserver (which is not JSON-RPC specific) but I guess most of the JSON-RPC log spam comes from JSON-RPC requests of python addons. And a lot of remotes use JSON-RPC over TCP.

The second commit reduces the log level of a log JSON-RPC log message from ERROR to WARNING. The problem is that at the time we don't know if it's actually an error or not. There are cases where it will be an error and others where it can resolved later on. So logging it as a WARNING should be less confusing.

@jmarshallnz
Copy link
Contributor

Looks good - thanks :)

jenkins build this please

jmarshallnz added a commit that referenced this pull request Mar 15, 2014
JSON-RPC: make logging of incoming requests optional and configurable
@jmarshallnz jmarshallnz merged commit 3deb74b into xbmc:master Mar 15, 2014
jmarshallnz added a commit that referenced this pull request Mar 15, 2014
JSON-RPC: make logging of incoming requests optional and configurable
@Montellese Montellese deleted the jsonrpc_optional_logging branch March 31, 2014 17:01
@FernetMenta
Copy link
Contributor

are there other location you forgot in this pr? checkout out this log, even the user complained: http://forum.xbmc.org/showthread.php?tid=192225&pid=1694224#pid1694224

(PS is there anyway to turn off the frickin JSON RPC log spam - that is really annoying and the log would be 1/10th the size without it...! It's just an LCD getting the playtime, as it has done for years, so ignore that..) 

@Montellese
Copy link
Member Author

Looks like he's either running a very outdated addon or a very bad third party app. First of all there are a ton of HTTP-API requests in the log which was already removed for Frodo. And then it looks like someone is hammering our TCP server with quick connects/disconnects which is obviously not how it should be used.

This PR was solely about the output of JSON-RPC calls I didn't consider anyone abusing our TCP server like this.

@MartijnKaijser MartijnKaijser added this to the Helix 14.0-alpha1 milestone May 23, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants