I am using ubuntu 14.04. I have to change the path of syslog file from /var/log to /opt/log. I have changed the path in 50-default.conf file from /var/log to /opt/log. I have restarted the rsyslog service also still it is not working. So how can I change the path?
Thanks for your help.
I found the solution for this question. It is as follows :
In 50-default.conf file. I added following lines at the end so that most of the messages get logged in the mylog.log file.
daemon.*;mail.*;\ news.err;\ *.=debug;*.=info;\ *.=notice;*.=warn -/opt/log/mylog.log
After this in opt folder I created a log folder and changed the permission as below:
sudo mkdir /opt/log sudo chmod -c 777 /opt/log
Then in /opt/log folder I created a mylog.log file and here also I changed the permission as below:
sudo touch mylog.log sudo chmod -c 777 mylog.log
And then I restarted the rsyslog service as follows :
sudo service rsyslog restart
Hope this will be helpful for some people.