Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

151
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda