You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Support for Wildcards: Allow wildcards like *.log to include all matching files in the specified directory.
List of Log Files: Accept a comma-separated list of specific log file names.
Example:
Directory-Based Pattern Matching: Allow specifying a directory with an optional pattern filter for files (e.g., all .log files in a directory).
Example:
AccessLogPath = /var/log/nginx/site-name/*.log
Benefits:
Simplifies configuration in environments with multiple log files.
Reduces manual effort in listing log files explicitly.
Improves flexibility and usability for large-scale setups.
Implementation Considerations:
Add parsing logic to support lists and wildcards in configuration.
Ensure backward compatibility with existing configurations using single log file paths.
Implement validation to check that all specified log files exist and align with LogDirWhiteList.
Example Use Case:
For a project where Nginx generates multiple log files, such as:
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: