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

[server] Print API function name in server logs #3105

Merged
merged 1 commit into from
Jan 11, 2021

Conversation

csordasmarton
Copy link
Contributor

Closes #3047

The current log output of the server outside verbose mode is not useful
because everything that is related to CodeChecker is accessed through
/CodeCheckerService.

This patch will log the API function names too in the following format:

[INFO 2020-11-24 11:12] - 127.0.0.1:39506 -- [Anonymous] POST /AdjacentParams/v6.35/CodeCheckerService@getReport

The current log output of the server outside verbose mode is not useful
because everything that is related to CodeChecker is accessed through
`/CodeCheckerService`.

This patch will log the API function names too in the following format:
```
[INFO 2020-11-24 11:12] - 127.0.0.1:39506 -- [Anonymous] POST /AdjacentParams/v6.35/CodeCheckerService@getReport
```
@csordasmarton csordasmarton changed the title [server] [server] Print API function name in server logs Dec 15, 2020
Comment on lines +348 to +350
cstringio_buf = itrans.cstringio_buf.getvalue()
itrans = TTransport.TMemoryBuffer(cstringio_buf)
iprot = input_protocol_factory.getProtocol(itrans)
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 needed because previously we started reading when iprot.readMessageBegin() was called, right? I hope this "low-level access" won't backfire magically.

Copy link
Member

@dkrupp dkrupp left a comment

Choose a reason for hiding this comment

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

LGTM

@dkrupp dkrupp merged commit b4f569d into Ericsson:master Jan 11, 2021
@csordasmarton csordasmarton deleted the log_api_function_names branch March 10, 2021 10:13
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.

Server logs in production mode are lacking information as virtually everything is at /CodeCheckerService
3 participants