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

Logging: Allow node owner to decide where to log #523

Closed
alexcos20 opened this issue Jul 5, 2024 · 1 comment
Closed

Logging: Allow node owner to decide where to log #523

alexcos20 opened this issue Jul 5, 2024 · 1 comment
Assignees
Labels
Milestone

Comments

@alexcos20
Copy link
Member

alexcos20 commented Jul 5, 2024

We should allow node-owner to decide where to see/keep the logs.

Proposal: Refactor logging module such:

  • have env LOG_LEVEL decide what logs are activated (no matter if NODE_ENV is production or development). If LOG_LEVEL is not defined, then if NODE_ENV='production' -> LOG_LEVEL=info, else LOG_LEVEL=DEBUG
  • if env LOG_CONSOLE is True, then all logs should be displayed on the console
  • if env LOG_FILES is True, then all logs should be save in log fines
  • if env LOG_DB is True and we have noSQL db, then all logs should be saved in noSQL db

If none of LOG_CONSOLE, LOG_FILES, LOG_DB are set the we default to console

Default for casual user will be set in the yaml file (will not be set in code) would be LOG_DB: true and LOG_LEVEL: ERROR

@paulo-ocean
Copy link
Contributor

closed on #553

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants