Skip to content

A setting for debug logs? #66

@ezsh

Description

@ezsh

We have quite many console.log() calls now that are not hidden behind the debug mode test. If they are meant to be used by users when investigating problems, perhaps we can hide them under a game settings?

log(category, message) {
    if (SugarCube.settings[category] == true) {
        if (typeof(message) == "string") {
            console.log("LOG["+ category + "]: " + message);
        } else {
            console.log("LOG["+ category + "]:"); console.log(message);
        }
    }
}

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions