Skip to content

Implement logging handler for development environment #52

@MichaelJamesParsons

Description

@MichaelJamesParsons

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);
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-ChoreIssues related to quality-of-life improvementsSprint-FutureIssues that will be worked on sometime in the future

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions