Skip to content

Update logging.md #390

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 10, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions content/nginx/admin-guide/monitoring/logging.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
description: Capture detailed information about errors and request processing in log
files, either locally or via syslog.
docs: DOCS-426
title: Configuring Logging
title: Configure Logging
toc: true
weight: 200
type:
Expand All @@ -12,7 +12,7 @@ type:
This article describes how to configure logging of errors and processed requests in NGINX Open Source and NGINX Plus.

<span id="error_log"></span>
## Setting Up the Error Log
## Set Up the Error Log

NGINX writes information about encountered issues of different severity levels to the error log. The [error_log](https://nginx.org/en/docs/ngx_core_module.html#error_log) directive sets up logging to a particular file, `stderr`, or `syslog` and specifies the minimal severity level of messages to log. By default, the error log is located at **logs/error.log** (the absolute path depends on the operating system and installation), and messages from all severity levels above the one specified are logged.

Expand All @@ -30,7 +30,7 @@ The default setting of the error log works globally. To override it, place the [


<span id="access_log"></span>
## Setting Up the Access Log
## Set Up the Access Log

NGINX writes information about client requests in the access log right after the request is processed. By default, the access log is located at **logs/access.log**, and the information is written to the log in the predefined **combined** format. To override the default setting, use the [log_format](https://nginx.org/en/docs/http/ngx_http_log_module.html#log_format) directive to change the format of logged messages, as well as the [access_log](https://nginx.org/en/docs/http/ngx_http_log_module.html#access_log) directive to specify the location of the log and its format. The log format is defined using variables.

Expand Down