Skip to content

feat: add logger #82

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

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft

feat: add logger #82

wants to merge 5 commits into from

Conversation

neolectron
Copy link
Member

@neolectron neolectron commented Sep 13, 2023

This adds pino as a logger.

  • allow us to create sub-logger for each modules with createLoggerForModule.
  • supports LOGLEVEL env-var to override the log levels.
  • prettify logs when env is not production.
  • prevent usage of console method through an eslint rule.
  • remove unnecessary console invocation.
  • remove catch block that only do console.error >.<
  • format messages with [moduleName] when not in production. - Blocked by DOMException [DataCloneError]: e=>e.toString() could not be cloned pinojs/pino-pretty#457
  • require to pass guild-id in modules when logging.
  • add logs in modules
  • add logs in redis - supports loglevels

@potb potb marked this pull request as draft September 13, 2023 21:52
@neolectron neolectron added the blocked blocked by another PR label Sep 13, 2023
@neolectron
Copy link
Member Author

Matteo Collina responded to the issue, actually there's some documentation there: https://github.com/pinojs/pino-pretty#handling-non-serializable-options

@neolectron neolectron removed the blocked blocked by another PR label Sep 14, 2023
@neolectron neolectron force-pushed the feat/add-logger-pino branch from f050b62 to 2e3baaa Compare October 15, 2023 16:49
@potb potb added the enhancement New feature or request label Oct 21, 2023
@potb potb force-pushed the master branch 2 times, most recently from c69e2ce to a754471 Compare January 5, 2024 12:13
@potb potb force-pushed the feat/add-logger-pino branch from 4c1929c to 6a16332 Compare May 25, 2024 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants