react-native-firebase/lib/utils/log.js

20 lines
441 B
JavaScript
Raw Normal View History

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