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

Improve logging #10

Merged
merged 3 commits into from
Mar 10, 2022
Merged

Improve logging #10

merged 3 commits into from
Mar 10, 2022

Conversation

johnstairs
Copy link
Contributor

  • Switching to zerolog for structured logging.
  • Log entries are JSON-formatted by default but this can be overridden with a command-line argument.
  • Log verbosity can be set with a command-line argument.
  • Each request is assigned a request ID, which is added each log message associated with the request and is returned as an HTTP response header.
  • Adding a log message when the server starts and has started listening on a port

@johnstairs johnstairs requested a review from hansenms March 9, 2022 22:33
Copy link
Member

@hansenms hansenms left a comment

Choose a reason for hiding this comment

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

Looks good. My only issue was that in the devcontainer the vscode user does not have write permissions in /go so build fails due to permission issues. A sudo chown -R vscode:vscode /go does the trick. I also see there is a golang group, but it is also not group writable in that folder, so maybe a tweak to that would work.

@johnstairs
Copy link
Contributor Author

Looks good. My only issue was that in the devcontainer the vscode user does not have write permissions in /go so build fails due to permission issues. A sudo chown -R vscode:vscode /go does the trick. I also see there is a golang group, but it is also not group writable in that folder, so maybe a tweak to that would work.

Will fix that in a separate PR.

@johnstairs johnstairs merged commit 3ffed9e into ismrmrd:main Mar 10, 2022
@johnstairs johnstairs deleted the johnstairs/zerolog branch March 10, 2022 00:59
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.

2 participants