Link to home
Start Free TrialLog in
Avatar of Nusrat Nuriyev
Nusrat NuriyevFlag for Azerbaijan

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?
Avatar of giltjr
giltjr
Flag of United States of America image

Avatar of Nusrat Nuriyev

ASKER

Good. Is there another method of logging besides syslog?
You could write your own logging routine instead of calling syslog.
does it involve writing to the file?
Sometimes writing to file just does not work.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members 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.