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

440
Visualizações
Log levels in Nginx: NGX_LOG_DEBUG_HTTP vs NGX_LOG_DEBUG

I am inspecting some Nginx code, in particular the code for Nginx module - upstream health check. At some places I see NGX_LOG_DEBUG_HTTP as the logging level, at others NGX_LOG_DEBUG. Could someone tell me which logging level is recommended to be used in which scenario?

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

This link has the required information. Here are few scenarios to explain how it works:

If your nginx.conf has log level defined as the generic debug

error_log error.log debug;

then all your logging statments with debug levels prefixed with NGX_LOG_DEBUG will be logged. For e.g.

ngx_log_debug(NGX_LOG_DEBUG, event->log, 0, "test"); ngx_log_debug(NGX_LOG_DEBUG_HTTP, event->log, 0, "test"); ngx_log_debug(NGX_LOG_DEBUG_CORE, event->log, 0, "test");

But if your nginx.conf is configured to log a specific kind of debug message, only those will be logged.

So, with this config:

error_log error.log debug_http;

this will happen:

ngx_log_debug(NGX_LOG_DEBUG_CORE, event->log, 0, "test"); //will not show up in the log
ngx_log_debug(NGX_LOG_DEBUG_HTTP, event->log, 0, "test"); //will show up in the log
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