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

log everything into gRPC.log #30

Merged
merged 1 commit into from
Sep 6, 2021
Merged

log everything into gRPC.log #30

merged 1 commit into from
Sep 6, 2021

Conversation

rkusa
Copy link
Collaborator

@rkusa rkusa commented Sep 5, 2021

I was a bit annoyed that I always have to watch both dcs.log and gRPC.log to find all error/warning logs. This PR makes sure that everything is logged into gRPC.log.

Wdyt?


GRPC.logWarning = function(err)
grpc.log_warning(err)
env.warning("[GRPC] "..err)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Logs it into both dcs.log and gRPC.log. I'd also be fine though to remove the logs from dcs.log.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think having warnings and exceptions in the main dsc.log reduces work for server admins. Everything else being in grpc.log is fine I think.

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, it just occurred to me. Can we keep the GRPC startup message appearing in DCS.log?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes the startup messages (loading ... and loaded ...) are kept in the dcs.log - I also think that they are very important to even know if the gRPC module started or not, as we cannot even expect logs in the gRPC.log file otherwise.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think having warnings and exceptions in the main dsc.log reduces work for server admins. Everything else being in grpc.log is fine I think.

Most errors and warnings would be mirrored into both files, but there are already errors that will only make it into the gRPC.log file. They are the ones that are logged on the Rust side. One of them being the fix for #19 as an example.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

My plan is btw to hook up the logging to https://sentry.io next, as I rarely skim logs for errors unless I've explicitly noticed something not working.

Copy link
Contributor

Choose a reason for hiding this comment

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

Could we avoid hooking directly up to certain sinks?

If we can make sure that the server outputs JSON logs to file then another separate application can then ship those json logs to the sinks of the admins choice. I know that Hoggit uses an ELK stack for example.

@rkusa rkusa requested a review from rurounijones September 5, 2021 09:23
@rkusa
Copy link
Collaborator Author

rkusa commented Sep 6, 2021

Rebased due to merge conflicts 🔀

@rkusa rkusa merged commit 83b8e7e into main Sep 6, 2021
@rkusa rkusa deleted the logging branch September 6, 2021 13:41
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