Improve logging of storage listener in logger
This commit is contained in:
parent
f53faac344
commit
a5685fa420
@ -99,12 +99,18 @@ class Logger {
|
||||
|
||||
br.storage.onChanged.addListener( (changes, area) => {
|
||||
if (process.env.CHANNEL === 'dev') {
|
||||
console.log("[Logger::<storage/on change>] Settings have been changed outside of here. Updating active settings. Changes:", changes, "storage area:", area);
|
||||
if (!changes.uwLogger) {
|
||||
console.info('[Logger::<storage/on change> No new logger settings!');
|
||||
}
|
||||
if (changes['uwLogger'] && changes['uwLogger'].newValue) {
|
||||
console.log("[Logger::<storage/on change>] new settings object:", JSON.parse(changes.uwLogger.newValue));
|
||||
console.log("[Logger::<storage/on change>] Logger have been changed outside of here. Updating active settings. Changes:", changes, "storage area:", area);
|
||||
console.info("[Logger::<storage/on change>] new logger settings object (parsed):", JSON.parse(changes.uwLogger.newValue));
|
||||
}
|
||||
}
|
||||
if (changes['uwLogger'] && changes['uwLogger'].newValue) {
|
||||
if (!changes['uwLogger']) {
|
||||
return;
|
||||
}
|
||||
if (changes['uwLogger']?.newValue) {
|
||||
const newConf = JSON.parse(changes.uwLogger.newValue);
|
||||
if (this.isContentScript && this.conf.allowLogging && !newConf.allowLogging) {
|
||||
this.saveToVuex();
|
||||
|
Loading…
Reference in New Issue
Block a user