Closed jhegedus42 closed 5 years ago
answer:
Put the following into the JS console before executing the code :
console.oldTrace=console.trace
f = function(x) { console.groupCollapsed(x);console.oldTrace(x); console.groupEnd()}
console.trace=f
Then you get:
@jhegedus42 Since trace can accept multiple arguments, it's better use apply
instead, also it looks better if it doesn't show same arguments twice (typescript friendly version)
{
const oldTrace= console.trace;
console.trace = (...args) => { console.groupCollapsed.apply(console, args); oldTrace(""); console.groupEnd()};
}
Hi,
Here is how it is possible to collapse TRACE logs, perhaps using something like this : https://mariusschulz.com/blog/advanced-javascript-logging-using-console-group
Something like this :
Is it possible to do the same with slogger ?
For me a trace looks like this : But it would be much nicer to have these "TRACE"-s already folded by default , like this :