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

Refactoring logs #1 #846

Closed
israelboudoux opened this issue Aug 2, 2022 · 0 comments · Fixed by #851
Closed

Refactoring logs #1 #846

israelboudoux opened this issue Aug 2, 2022 · 0 comments · Fixed by #851

Comments

@israelboudoux
Copy link
Contributor

israelboudoux commented Aug 2, 2022

  • We will stick to the pino logging library (https://www.npmjs.com/package/pino), just to follow what nightfall-sdk is using, then it will become our default library. We need to configure it;
  • The logging level and other possible definitions will be defined via environment variables (See https://github.com/maticnetwork/nightfall-sdk/blob/master/libs/utils/logger.ts);
  • The default format for logs is JSON, then this should be configured accordingly in the library;
  • The logs can use pretty JSON when using a local environment, just to facilitate reading the logs during development. We can do this via some environment variable;
  • The output should be directed to stdout/stderr - I think we are already doing it!;
  • Change all logs calls that aren't the default ones (trace, debug, info, warn, error) to debug (e.g. silly);
  • Test to verify the correct behavior of the applications and to assert that the work is completed thoroughly.

In another moment we will refactor the log messages and add information that could be valuable for troubleshooting (See #847)

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 a pull request may close this issue.

1 participant