mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2026-04-25 08:45:58 +03:00
[GH-ISSUE #762] Support for Multiple Log File Names in Configuration #1749
Labels
No labels
Q/A
bug
casdoor
dependencies
docker
documentation
duplicate
enhancement
help wanted
invalid
lego
platform:openwrt
platform:windows
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nginx-ui#1749
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @stuxMY on GitHub (Nov 26, 2024).
Original GitHub issue: https://github.com/0xJacky/nginx-ui/issues/762
Currently, the Nginx UI configuration allows specifying paths for access and error logs (AccessLogPath and ErrorLogPath). However, it does not support defining multiple specific log file names or utilizing wildcards (e.g., *.log) for log paths. This limitation requires either manual listing of individual log files or restricting log handling to a single file or directory, which can be cumbersome in environments with multiple log files.
Proposed Enhancement:
Add support for specifying multiple log file names in AccessLogPath and ErrorLogPath. This can be implemented in one or more of the following ways:
AccessLogPath = /var/log/nginx/site-name/access.log, /var/log/nginx/site-name/access_api.log
Directory-Based Pattern Matching: Allow specifying a directory with an optional pattern filter for files (e.g., all .log files in a directory).
Example:
Benefits:
Implementation Considerations:
Example Use Case:
For a project where Nginx generates multiple log files, such as:
The following configuration could be used:
[nginx]
AccessLogPath = /var/log/nginx/sites-name/*.log
ErrorLogPath = /var/log/nginx/sites-name/error.log
LogDirWhiteList = /var/log/nginx/site-name
Alternatives:
While scripting can be used to generate configurations dynamically, native support for multiple log file names and patterns would greatly simplify the process and reduce user error.
Additional Context:
Supporting this feature aligns with usability improvements for users managing logs in complex environments. It also provides flexibility for teams needing fine-grained log management across multiple files.