Skip to content

Commit

Permalink
This was embarrassing. Used the uuid to look up the extension (wrong way
Browse files Browse the repository at this point in the history
to get the extension; should pass it to where it's needed), and I used
the extension to get the uuid. D'oh.
  • Loading branch information
dsheeler committed Feb 16, 2024
1 parent 7f69d91 commit 5d23808
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

import {Extension} from 'resource:///org/gnome/shell/extensions/extension.js';

// This method can be used to write a message to GNOME Shell's log. This is enhances
// the standard log() functionality by prepending the extension's name and the location
// where the message was logged. As the extensions name is part of the location, you
Expand All @@ -42,13 +40,10 @@ export function debug(message) {

// Find the index of the extension directory (e.g. [email protected])
// in the stack entry. We do not want to print the entire absolute file path.
let ExtensionObj = Extension.lookupByUUID('[email protected]');

const extensionRoot = stack[0].indexOf(ExtensionObj.metadata.uuid);
const extensionRoot = stack[0].indexOf('[email protected]');

log('[' + stack[0].slice(extensionRoot) + '] ' + message);
log(new Error().stack);

}

/**
Expand Down

0 comments on commit 5d23808

Please sign in to comment.