Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

150
Vistas
ejs.renderFile keeps logging output to stdout

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

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

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 = true
  • res.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).

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda