Hello, I am using TSLog in my project, and am coming across a weird scenario where the debug log is not printing a map being defined in the same function. I have tried console logging the map within the same function and am having no issues. I will include pseudocode below to illustrate what I mean.
public logger = new Logger({ name: 'myLogger'});
myFunction() {let map = new Map();map.set('foo', 'bar');this.logger.debug('My Map: ', map) // prints in console "DEBUG myLogger My Map: {}"console.log('My Map: ', map) // prints in console "My Map: Map(1) { 'foo' => 'bar' }"}
I am expecting a log to show something like this:
"DEBUG myLogger My Map: Map(1) { 'foo' => 'bar' }"
node version v16.17.0
"tslog": "^4.7.1"
Windows 11, running in Edge Browser
Hello, I am using TSLog in my project, and am coming across a weird scenario where the debug log is not printing a map being defined in the same function. I have tried console logging the map within the same function and am having no issues. I will include pseudocode below to illustrate what I mean.
public logger = new Logger({ name: 'myLogger'});
myFunction() {
let map = new Map();
map.set('foo', 'bar');
this.logger.debug('My Map: ', map) // prints in console "DEBUG myLogger My Map: {}"
console.log('My Map: ', map) // prints in console "My Map: Map(1) { 'foo' => 'bar' }"
}
I am expecting a log to show something like this:
"DEBUG myLogger My Map: Map(1) { 'foo' => 'bar' }"
node version v16.17.0 "tslog": "^4.7.1" Windows 11, running in Edge Browser