sessionMode: Log mode changes
Now that console.debug() makes it easy to log message with DEBUG priority, we can be a lot more generous with logging without spamming logs (by default). Those turned out useful in figuring out the issue in the next commit, so let's keep them. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2413>
This commit is contained in:
parent
dcc54c041f
commit
111e982eb7
@ -158,6 +158,7 @@ var SessionMode = class extends Signals.EventEmitter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pushMode(mode) {
|
pushMode(mode) {
|
||||||
|
console.debug(`sessionMode: Pushing mode ${mode}`);
|
||||||
this._modeStack.push(mode);
|
this._modeStack.push(mode);
|
||||||
this._sync();
|
this._sync();
|
||||||
}
|
}
|
||||||
@ -165,6 +166,8 @@ var SessionMode = class extends Signals.EventEmitter {
|
|||||||
popMode(mode) {
|
popMode(mode) {
|
||||||
if (this.currentMode != mode || this._modeStack.length === 1)
|
if (this.currentMode != mode || this._modeStack.length === 1)
|
||||||
throw new Error("Invalid SessionMode.popMode");
|
throw new Error("Invalid SessionMode.popMode");
|
||||||
|
|
||||||
|
console.debug(`sessionMode: Popping mode ${mode}`);
|
||||||
this._modeStack.pop();
|
this._modeStack.pop();
|
||||||
this._sync();
|
this._sync();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user