You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
1.4 KiB
54 lines
1.4 KiB
"use strict";
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports.default = void 0;
|
|
function _bunyan() {
|
|
const data = _interopRequireDefault(require("@expo/bunyan"));
|
|
_bunyan = function () {
|
|
return data;
|
|
};
|
|
return data;
|
|
}
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
class ConsoleRawStream {
|
|
write(record) {
|
|
if (record.level < _bunyan().default.DEBUG) {
|
|
console.debug(record);
|
|
} else if (record.level < _bunyan().default.INFO) {
|
|
console.log(record);
|
|
} else if (record.level < _bunyan().default.WARN) {
|
|
console.info(record);
|
|
} else if (record.level < _bunyan().default.ERROR) {
|
|
console.warn(record);
|
|
} else {
|
|
console.error(record);
|
|
}
|
|
}
|
|
}
|
|
const logger = _bunyan().default.createLogger({
|
|
name: 'expo',
|
|
serializers: _bunyan().default.stdSerializers,
|
|
streams: process.env.EXPO_RAW_LOG && process.env.NODE_ENV !== 'production' ? [{
|
|
type: 'raw',
|
|
stream: new ConsoleRawStream(),
|
|
closeOnExit: false,
|
|
level: 'debug'
|
|
}] : []
|
|
});
|
|
var _default = {
|
|
child: options => logger.child(options),
|
|
notifications: logger.child({
|
|
type: 'notifications'
|
|
}),
|
|
global: logger.child({
|
|
type: 'global'
|
|
}),
|
|
DEBUG: _bunyan().default.DEBUG,
|
|
INFO: _bunyan().default.INFO,
|
|
WARN: _bunyan().default.WARN,
|
|
ERROR: _bunyan().default.ERROR
|
|
};
|
|
exports.default = _default;
|
|
//# sourceMappingURL=Logger.js.map
|