1

One of the service is writting logs by default in /var/log/messages file. I want that service logs to be written other file.

Logs in /var/log/messages files are being dislpalyed as below.

Nov 20 16:18:40 testserver ServiceName:

I tried changing the configuration in /etc/syslog.conf as below

cat /etc/syslog.conf

*.info;authpriv.none;cron.none /var/log/messages

ServiceName /var/log/servicename.log

But still the logs are being written in /var/log/messages file only instead of /var/log/servicename.log.

Request to suggest how to get logs in to other file.

Best Wishes, KJ.

1 Answer 1

1

Syntax for this command is:

ServiceName.* -/var/log/ServiceName.log

Reference: Rsyslog outputting to custom log file

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .