In environments where a logging level has been explicitly set and persisted (usually a developer’s browser), it’d be nice to be able to leave the logging level alone, while otherwise giving a default logging level to use if one hasn’t been persisted. The only way to accomplish this right now is to explicitly peek into local storage or cookies to see if a value is set, which isn’t very nice.
I’m thinking this could either be a third argument to setLevel or, probably clearer, a separate method, e.g. setDefaultLevel.
In environments where a logging level has been explicitly set and persisted (usually a developer’s browser), it’d be nice to be able to leave the logging level alone, while otherwise giving a default logging level to use if one hasn’t been persisted. The only way to accomplish this right now is to explicitly peek into local storage or cookies to see if a value is set, which isn’t very nice.
I’m thinking this could either be a third argument to
setLevel
or, probably clearer, a separate method, e.g.setDefaultLevel
.