I have an application that can run in two modes, either with a CLI, or as a daemon.
I am using syslog()
for logging. However, when run in CLI mode I'd like all the logging, except those marked LOG_DEBUG
, messages to be sent to the console instead of logged.
I have tried to use setlogmask()
, but that doesn't seem to redirect to console.
What is the best way to do this?