-
Notifications
You must be signed in to change notification settings - Fork 24
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
Conversation
|
||
GRPC.logWarning = function(err) | ||
grpc.log_warning(err) | ||
env.warning("[GRPC] "..err) |
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Rebased due to merge conflicts 🔀 |
I was a bit annoyed that I always have to watch both
dcs.log
andgRPC.log
to find all error/warning logs. This PR makes sure that everything is logged intogRPC.log
.Wdyt?