We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug
When I log.error any Error that has read only properties, tslog throws an exception:
log.error
Error
tslog
.../node_modules/tslog/dist/cjs/BaseLogger.js:179 o[prop] = keys.includes(this.settings?.maskValuesOfKeysCaseInsensitive !== true ? prop : prop.toLowerCase()) ^ TypeError: Cannot assign to read only property '$response' of object 'ValidationException: ...' .../node_modules/tslog/dist/cjs/BaseLogger.js:179:45
To Reproduce Steps to reproduce the behavior:
var tslog = require('tslog') var logger = new tslog.Logger() function createReadonlyError(message, property) { const error = new Error(message); Object.defineProperty(error, 'property', { value: property, writable: false, enumerable: true, configurable: false }); return error; } var e = createReadonlyError('message', 'property') logger.error(e)
Expected behavior
Don't throw exceptions when logging errors (or any object with readonly props for that matter)
Additional context
Using tslog@4.7.4
tslog@4.7.4
Node.js Version 18.14.0
OS incl. Version macOS 12.5
The text was updated successfully, but these errors were encountered:
Thank you. I'll fix it soon.
Sorry, something went wrong.
a5a0ac2
V4.7.5 is out.
V4.7.5
Thank you @terehov ! Appreciate the fast turnaround.
No branches or pull requests
Describe the bug
When I
log.error
anyError
that has read only properties,tslog
throws an exception:To Reproduce
Steps to reproduce the behavior:
Expected behavior
Don't throw exceptions when logging errors (or any object with readonly props for that matter)
Additional context
Using
tslog@4.7.4
Node.js Version
18.14.0
OS incl. Version
macOS 12.5
The text was updated successfully, but these errors were encountered: