-
Notifications
You must be signed in to change notification settings - Fork 94
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
Introduce logging framework #238
Comments
One advantage of the introduction of a logging framework would be: |
Agreed that some more advanced logging that would allow to specify and filter by log level would make sense. I took a quick look at pino and not sure having logs in json is a good idea, that would make their manual inspection without additional tools more difficult. Not sure I get your idea of getting rid of email notifications, what for? Are you suggesting something hoster-specific? |
There are some other cloud solutions for logging too, but these get very costly with the amount of logs that Obyte nodes generate https://www.papertrail.com/ As I understand, @frank-bee suggestion is to replace those email notifications with some other logging system, so there would be no need to have sendmail or SMTP. |
Other things being equal, I would always prefer standard, well-known, and widely available email over third-party services with their proprietary APIs. |
That one of the advantages. Furthermore it allows you to react differently on different types of logs, e.g. for error or fatal errors one could inform some admin via alert. In general it makes sense to introduce some kind of logging architecture. It is a way of doing "seperation of concerns" which are here: collection, transport, storage, analysis, alerting.
|
I would not replace it but rather get rid of it. If you have the logs in a proper format, it is up the node hoster to "do someting with the logs". As I described about, typically your store the logs somewhere for later analysis ( e.g. papertrail, cloudwatch,...) plus you confiugre some alarm on e.g. errors (e.g cloudwatch + SNS in AWS or something similar in ELK or papertrail) |
|
Not sure I get it. Everything, which has the headless-obyte as dependency is already writing to log file, so if you mount ~/.config/headless-obyte/ do different drive then you can have the node drive separated from the data drive. And even without mounting to separate, you could make something to tail the log file from main drive. Everything without headless-obyte, you can still output the stdout and stderr to logfile and tail that log while with some other process. It's all doable already today, just matter of how you want to set it up. |
Currently the main issues I see regarding logging:
I don't think there is much to implement but basically agree on a way to do logging ( to some extend) |
What is missing in the log.txt that gets generated with headless-obyte or from the screen of other nodes that you can direct to any file? I see that each line starts with:
|
Currently errors are thrown as follows:
throw Error("rocksdb open failed: " + err);
Like this they end up on standard error (logs to standard out).
This is very difficult to parse and to used e.g. for alertings.
Let's introduce a log framework, e.g.
https://github.com/pinojs/pino
see also #239
The text was updated successfully, but these errors were encountered: