hot-update/packages/update-manager/js/logger.js
2021-02-02 22:20:01 +08:00

12 lines
588 B
JavaScript

const logger = (global && global.Editor) || (global && global.console) || (window && window.console);
/**
* 适配不同Logger 对象.
* @type {{warn: (message?: any, ...optionalParams: any[]) => void, log: (message?: any, ...optionalParams: any[]) => void, success: any | ((message?: any, ...optionalParams: any[]) => void), error: (message?: any, ...optionalParams: any[]) => void, info: (message?: any, ...optionalParams: any[]) => void}}
*/
module.exports = {
log: logger.log,
info: logger.info,
warn: logger.warn,
error: logger.error,
success: logger.success
}