Nusrat Nuriyev
asked on
Redefine system log filepath for distinct application
Could I use syslog() function in a way that allows to redefine the log message file?
By default all log messages are written to
/var/log/messages
I want to redefine it to /var/log/mymessages in such way, that only my C application will have access to this file.
Is it possible?
By default all log messages are written to
/var/log/messages
I want to redefine it to /var/log/mymessages in such way, that only my C application will have access to this file.
Is it possible?
ASKER
Good. Is there another method of logging besides syslog?
You could write your own logging routine instead of calling syslog.
ASKER
does it involve writing to the file?
Sometimes writing to file just does not work.
Sometimes writing to file just does not work.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIALMembers can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
http://www.balabit.com/sites/default/files/documents/syslog-ng-ose-latest-guides/en/syslog-ng-ose-guide-admin/html/chapter-routing-filters.html
http://www.rsyslog.com/doc/rsyslog_conf_filter.html