Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

439
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!