I have a project using Express.JS with EJS as view engine. Whenever I run ejs.renderFile, either directly or with res.render, the generated function body gets logged to stdout.
It only happens when NODE_ENV is set to debug but the thing is that another team has a project with the same setup where it doesn't log anything even when they set NODE_ENV to debug.
I can't find anything different in their project that could account for this and they don't know either because they simply never had to do anything for it to not log.
I can prevent the logging when using res.renderFile by specifying the option debug: false, but I can't for the life of me figure out how to prevent it when using res.render.
Express.JS version: 4.15.2
EJS version: 2.5.6
I can think of three ways how this can happen (instead of true, any truish value will do):
app.set('view options', { debug : true })app.locals.debug = trueres.render('template', { debug : true })The last two will trigger debug logging because AFAIK there is no distinction made between parameters-to-be-rendered and template-engine-options (at least not for EJS).