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

Integrate Logging Library #76

Open
YashKumarVerma opened this issue Mar 13, 2021 · 5 comments
Open

Integrate Logging Library #76

YashKumarVerma opened this issue Mar 13, 2021 · 5 comments

Comments

@YashKumarVerma
Copy link
Contributor

YashKumarVerma commented Mar 13, 2021

Is your feature request related to a problem? Please describe.

  • the codebase currently relies on console.log for logging
  • this does not provide the features like assigning context to logs and dumping them to files.
  • the readme in distro says

    Logging - Container Logging is, for HIPAA reasons, disabled. Feel free to use a different logging engine if desired, especially for development.
    which means that we could a full-feature logger for development purposes.

Describe the solution you'd like

  • integration of a good logging service (like morgan?) to aid development lifecycle.
  • config to not produce logs in prod mode but give extensive logs in dev mode. Can be easily done using logging levels.

Describe alternatives you've considered

  • any other login library?
  • a custom-written bunch of methods if a dedicated library brings lot of overhead.

Additional context

  • this would greatly ease development / debugging.
@birm
Copy link
Member

birm commented Mar 13, 2021

I think you've given the wrong link to distro.
The statement on disabled logging is no longer accurate. I've just updated it in development.
In short, it turns out that very few people had concerns about PHI in the logs, but people did have issues with the mongo service (usually) not working without any hints.

Anyway, to the topic of your actual request:
I think improving logs, with or without middleware, is a good idea. We'll certainly open a reasonable PR about that on this repo. Thank you for the suggestion in any case!

@YashKumarVerma
Copy link
Contributor Author

thanks for the detailed answer! just fixed the link 🤦🏼

I'm interested in working on this as I'd be able to understand the codebase better. Could I?

@YashKumarVerma
Copy link
Contributor Author

@birm ping 👀

@birm
Copy link
Member

birm commented Mar 19, 2021

Of course! I may or may not be picky on the PR, but we'll always welcome improvements! Thank you for your interest.

@Parth-Thummar
Copy link

Can I implement logger module with singleton design pattern and create separate function to log different errors and info logs?

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.

3 participants