plugins: prefix logger with the plugin name

This commit is contained in:
Reto Brunner 2021-10-13 23:39:32 +02:00
parent 02ccbc1f69
commit 1e896a9672

View File

@ -49,10 +49,10 @@ const packageApis = function (packageInfo) {
getPersistentStorageDir: getPersistentStorageDir.bind(this, packageInfo.packageName),
},
Logger: {
error: (...args) => log.error(...args),
warn: (...args) => log.warn(...args),
info: (...args) => log.info(...args),
debug: (...args) => log.debug(...args),
error: (...args) => log.error(`[${packageInfo.packageName}]`, ...args),
warn: (...args) => log.warn(`[${packageInfo.packageName}]`, ...args),
info: (...args) => log.info(`[${packageInfo.packageName}]`, ...args),
debug: (...args) => log.debug(`[${packageInfo.packageName}]`, ...args),
},
};
};