RangeError: Maximum call stack size exceeded with customize formatter
See original GitHub issueSee below codes
var winston = require('winston');
var request = require('request');
var util = require('util');
var logger = new (winston.Logger)({
transports: [new winston.transports.Console({
level: 'info',
exitOnError: false,
json: false,
formatter: function defaultFormatter(options) {
console.log('formatter is called');
return options.message + '\n' + util.inspect( options.meta, {depth: 1});
}
})]
});
request.get('http://www.google.com', function(err, resp){
logger.info('Log response object.', resp);
});
When execute above code, RangeError occurs. And formatter is called
is not printed in log
Similar to #100
Issue Analytics
- State:
- Created 7 years ago
- Reactions:7
- Comments:8 (2 by maintainers)
Top Results From Across the Web
javascript - Maximum call stack size exceeded error
It means that somewhere in your code, you are calling a function which in turn calls another function and so forth, until you...
Read more >JavaScript RangeError: Maximum Call Stack Size Exceeded
The RangeError: Maximum call stack size exceeded is thrown when a function call is made that exceeds the call stack size. This can...
Read more >RangeError: Maximum call stack size exceeded - GitLab
Thank for you for publishing this reporter. I'm trying to use it in one of my projects, and I'm running into this issue....
Read more >InternalError: too much recursion - JavaScript - MDN Web Docs
The JavaScript exception "too much recursion" or "Maximum call stack size exceeded" occurs when there are too many function calls, or a function...
Read more >6.5: Confused! Keeps saying RangeError: Maximum call stack ...
Keeps saying RangeError: Maximum call stack size exceeded. ... You'll have better response, if you'll use the formatting tools to begin with.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The fix is add below code before https://github.com/winstonjs/winston/blob/master/lib/winston/common.js#L217
Need to have
options.meta
decycled beforeclone
.This has been published, issue can be closed out