Place a package-specific rsyslog rule in a separate .conf file included by the main configuration.
Which directory is representative?
/etc/rsyslog.d contains additional .conf files included by rsyslog.
Detailed explanation
/etc/logrotate.d/Incorrect. /etc/logrotate.d is for logrotate rules.
Incorrect. /etc/logrotate.d is for logrotate rules.
/etc/rsyslog.d/Correct. /etc/rsyslog.d is the standard rsyslog drop-in directory.
Correct. /etc/rsyslog.d is the standard rsyslog drop-in directory.
/var/log/journal/Incorrect. /var/log/journal contains journal data.
Incorrect. /var/log/journal contains journal data.
/run/log/journal/Incorrect. /run/log/journal contains volatile journal data.
Incorrect. /run/log/journal contains volatile journal data.
Try it yourself
An example you can run in a temporary verification environment.
test -d /etc/rsyslog.d && printf '%s\n' /etc/rsyslog.d || printf '%s\n' 'drop-in directory absent'Expected result
/etc/rsyslog.d、またはdrop-in directory absentKey points
- Drop-in directory
- Usually .conf
- Load order matters
Notes
- Environment: Linux / directory存在確認のみ
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.