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:
Florian Müllner 2022-08-09 12:52:58 +02:00 committed by Marge Bot
parent dcc54c041f
commit 111e982eb7

View File

@ -158,6 +158,7 @@ var SessionMode = class extends Signals.EventEmitter {
}
pushMode(mode) {
console.debug(`sessionMode: Pushing mode ${mode}`);
this._modeStack.push(mode);
this._sync();
}
@ -165,6 +166,8 @@ var SessionMode = class extends Signals.EventEmitter {
popMode(mode) {
if (this.currentMode != mode || this._modeStack.length === 1)
throw new Error("Invalid SessionMode.popMode");
console.debug(`sessionMode: Popping mode ${mode}`);
this._modeStack.pop();
this._sync();
}