mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-01 22:02:11 +03:00
21ec26ea08
no issue - we're killing off `ghost-ignition` in favor of explicit packages containing its individual components - this commit switches the Members repo to using the `@tryghost/ignition-errors` and `@tryghost/debug` dependencies, updates the code with relevant changes and removes the `ghost-ignition` dependency
23 lines
607 B
JavaScript
23 lines
607 B
JavaScript
let currentLogger = {
|
|
error: global.console.error,
|
|
info: global.console.info,
|
|
warn: global.console.warn
|
|
};
|
|
|
|
module.exports = {
|
|
get logging() {
|
|
const loggerInterface = Object.create(currentLogger);
|
|
return Object.assign(loggerInterface, {
|
|
setLogger(newLogger) {
|
|
currentLogger = newLogger;
|
|
// Overwrite any existing reference to loggerInterface
|
|
Object.assign(loggerInterface, Object.create(newLogger));
|
|
}
|
|
});
|
|
},
|
|
|
|
get errors() {
|
|
return require('@tryghost/ignition-errors');
|
|
}
|
|
};
|