Changing of syslog file path instead of /var/log directory

Hi

Please let me know how can we change the syslog file path from /var/log to /a directory in solaris

Regards

syslog on Solaris is using /var/adm by default. To modify this behavior change it in /etc/syslog.conf

Thanks for the reply.

I am suspecting the below line in the /etc/syslog.conf will change the specfic path of syslog file. Please confirm.

mail.debug ifdef(`LOGHOST', /var/log/syslog, @loghost)

If suppose /a is the directory for syslog file then entry will be

mail.debug ifdef(`LOGHOST', /a/syslog, @loghost)

Then we have to restart the syslog service after making changes.

I have done the above activity but syslog file is not created in /a directory. It might be possible when there will be a log generated then it will created automatically. Could you tell me how to create a log into this file .

Regards

First you have to check which host is the loghost. Do:

grep loghost /etc/hosts

If loghost is the same system you are making the changes on, then create the file that you want to log to, with:

touch /a/syslog

Then restart syslog daemon.

Thanks a lot