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

Implement logging handler for development environment #52

Open
MichaelJamesParsons opened this issue Jan 5, 2019 · 0 comments
Open
Labels
C-Chore Issues related to quality-of-life improvements Sprint-Future Issues that will be worked on sometime in the future

Comments

@MichaelJamesParsons
Copy link
Contributor

Description

Sometimes we use console logs that are useful for debugging in development, but shouldn't be present in production. We should implement a simple wrapper to conditionally log content depending on the environment.

Requirements/Expected Behavior

Implement a logger that outputs messages to the console only in development mode.

debugLogger.info('some useful info');
debugLogger.warn('some useful warning');
debugLogger.error('some useful error');

The implementation should be simple. Something like this will do:

function info (msg) {
    if (isDevMode()) {
        console.log(msg);
    }
}
@MichaelJamesParsons MichaelJamesParsons added the C-Chore Issues related to quality-of-life improvements label Jan 5, 2019
@ELD ELD added the Sprint-Future Issues that will be worked on sometime in the future label Mar 22, 2019
@MichaelJamesParsons MichaelJamesParsons removed this from the Titan 0.1.2 - Reports milestone Jul 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Chore Issues related to quality-of-life improvements Sprint-Future Issues that will be worked on sometime in the future
Projects
None yet
Development

No branches or pull requests

2 participants