Skip to content

Add logging with winston #853

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

Open
siddhant1 opened this issue Mar 1, 2019 · 10 comments
Open

Add logging with winston #853

siddhant1 opened this issue Mar 1, 2019 · 10 comments
Labels
Priority:High Should be addressed soon but not critical Type:Task Tasks tied specifically to developer operations and maintenance

Comments

@siddhant1
Copy link
Contributor

I think we should remove console.logs from the code

Links :- https://dev.to/mornir/-dont-leave-console-logs-in-production-14na
https://hackernoon.com/please-stop-using-console-log-its-broken-b5d7d396cf15

I can send in a PR

Have a look @catarak

@catarak
Copy link
Member

catarak commented Mar 1, 2019

totally! it would be amazing to add a logging library. maybe this ticket could be that—investigate and add logging library?

@siddhant1
Copy link
Contributor Author

Yeah , I will look into it and start refactoring

@catarak catarak changed the title Remove redundant console.logs Investigate logging library, and add a basic configuration of it Mar 1, 2019
@siddhant1
Copy link
Contributor Author

As I was looking through the code , I found out that most of the console statements were used for debugging and some for handling errors.
There are 2 ways to solve this.

  1. Remove console.logs used for debugging
    2.find a way to disable console.logs on the prod mode and enable in dev mode which agains boils down to adding a logging library

@catarak
Copy link
Member

catarak commented Mar 4, 2019

sounds great to me!

@siddhant1
Copy link
Contributor Author

@catarak I was thinking of a solution to this ticket.
Should I monkey patch window.console.log which checks if we are in dev mode or prod mode and logs only in dev mode?

@catarak
Copy link
Member

catarak commented Mar 8, 2019

process.env.NODE_ENV is already passed to the front end (e.g. in App.jsx), so removing console logs when in prod should be pretty simple!

@GaurangTandon
Copy link
Contributor

@siddhant1 Could I please work on this issue while you're working on the other ones? Thank you!

@siddhant1
Copy link
Contributor Author

Hey Gaurang , this issue was already solved and needs to be closed. You can work on other ones :)

@catarak
Copy link
Member

catarak commented Mar 19, 2019

@siddhant1 / @GaurangTandon this issue hasn't been solved. no logging library has been added.

@siddhant1
Copy link
Contributor Author

The issue was originally to remove logs which was done , for adding logging library , I will send a pr soon

@catarak catarak changed the title Investigate logging library, and add a basic configuration of it Add logging with winston Feb 10, 2021
@catarak catarak added Good First Issue A beginner-friendly issue, great for first-time contributors Help Wanted Would love additional input or contributions! Priority:High Should be addressed soon but not critical Type:Task Tasks tied specifically to developer operations and maintenance labels Feb 10, 2021
@sagar-joshi sagar-joshi mentioned this issue Feb 18, 2021
3 tasks
@raclim raclim removed Help Wanted Would love additional input or contributions! Good First Issue A beginner-friendly issue, great for first-time contributors labels May 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority:High Should be addressed soon but not critical Type:Task Tasks tied specifically to developer operations and maintenance
Projects
None yet
4 participants