I need some clever logging library for a daemon-like C (not C++) program on Linux. It needs to be open-source. It should support logging to files, maybe sockets etc.
Or at least some good tips or tricks or best practices.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use syslog() . This decouples your in program logging from how the logs are handled. rsyslog is used on most Linux distributions nowadays, and allows great flexibility on how the logs are processed.