Log event args when tracing is enabled

This commit is contained in:
Cohee
2024-05-29 00:57:32 +03:00
parent 309eb80748
commit 7d983adc6e

View File

@@ -96,7 +96,7 @@ EventEmitter.prototype.removeListener = function (event, listener) {
EventEmitter.prototype.emit = async function (event) {
if (localStorage.getItem('eventTracing') === 'true') {
console.trace('Event emitted: ' + event);
console.trace('Event emitted: ' + event, args);
} else {
console.debug('Event emitted: ' + event);
}
@@ -121,7 +121,7 @@ EventEmitter.prototype.emit = async function (event) {
EventEmitter.prototype.emitAndWait = function (event) {
if (localStorage.getItem('eventTracing') === 'true') {
console.trace('Event emitted: ' + event);
console.trace('Event emitted: ' + event, args);
} else {
console.debug('Event emitted: ' + event);
}