mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Log event args when tracing is enabled
This commit is contained in:
@@ -96,7 +96,7 @@ EventEmitter.prototype.removeListener = function (event, listener) {
|
|||||||
|
|
||||||
EventEmitter.prototype.emit = async function (event) {
|
EventEmitter.prototype.emit = async function (event) {
|
||||||
if (localStorage.getItem('eventTracing') === 'true') {
|
if (localStorage.getItem('eventTracing') === 'true') {
|
||||||
console.trace('Event emitted: ' + event);
|
console.trace('Event emitted: ' + event, args);
|
||||||
} else {
|
} else {
|
||||||
console.debug('Event emitted: ' + event);
|
console.debug('Event emitted: ' + event);
|
||||||
}
|
}
|
||||||
@@ -121,7 +121,7 @@ EventEmitter.prototype.emit = async function (event) {
|
|||||||
|
|
||||||
EventEmitter.prototype.emitAndWait = function (event) {
|
EventEmitter.prototype.emitAndWait = function (event) {
|
||||||
if (localStorage.getItem('eventTracing') === 'true') {
|
if (localStorage.getItem('eventTracing') === 'true') {
|
||||||
console.trace('Event emitted: ' + event);
|
console.trace('Event emitted: ' + event, args);
|
||||||
} else {
|
} else {
|
||||||
console.debug('Event emitted: ' + event);
|
console.debug('Event emitted: ' + event);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user