2017-03-02 13:10:10 +00:00
|
|
|
import { windowOrGlobal } from './';
|
|
|
|
|
|
|
|
((base) => {
|
|
|
|
window = base || window;
|
|
|
|
if (!window.localStorage) window.localStorage = {};
|
|
|
|
})(windowOrGlobal);
|
|
|
|
|
2017-06-29 16:24:34 +00:00
|
|
|
// clean up time
|
2017-03-02 13:10:10 +00:00
|
|
|
|
2017-06-29 16:24:34 +00:00
|
|
|
export default class Log {
|
|
|
|
static createLogger(namespace) {
|
|
|
|
return require('bows')(namespace);
|
2017-03-02 13:10:10 +00:00
|
|
|
}
|
|
|
|
|
2017-06-29 16:24:34 +00:00
|
|
|
static setLevel(booleanOrDebugString) {
|
|
|
|
window.localStorage.debug = booleanOrDebugString;
|
|
|
|
window.localStorage.debugColors = !!booleanOrDebugString;
|
2017-03-02 13:10:10 +00:00
|
|
|
}
|
|
|
|
}
|