Syslog Config

Description

Install / uninstall the syslog-ng and logrotate config file during package start / stop.

Please refer to syslog-ng on how to write the syslog-ng's config file.

  • Acquire(): Copy patterndb / logratoate to /usr/local/etc/syslog-ng/patterndb.d/ / /usr/local/etc/logrotate.d/. Then reload syslog-ng.
    • If file exists, unlink() it first.
    • Failure on any file copy results in this worker to abort and triggers rollback.
  • Release(): Delete the config files and reload syslog-ng.
    • Ignore unlink() failure.

Provider

DSM

Timing

FROM_ENABLE_TO_DISABLE

Environment Variables

None

Updatable

No

Syntax

"syslog-config": {
  "patterndb-relpath": "<relpath>",
  "logrotate-relpath": "<relpath>"
}
Member Since Description
patterndb-relpath 6.0-7145 String, syslog-ng's config file's relative path under /var/packages/${package}/target/, ignore this if the log is not generated by syslog-ng (optional)
logrotate-relpath 6.0-5911 String, logrotate's config file's relative path under /var/packages/${package}/target/, ignore this if log is saved to database (optional)

Example

"syslog-config": {
  "patterndb-relpath": "etc/syslog-ng.conf",
  "logrotate-relpath": "etc/logrotate.conf"
}