I have a QtQuick/QML application running on a remote embedded target system. I have syslog configured on the target to direct log messages to a log server.
Now, I'd like to have the standard out and err console output also redirected to the local syslog so I can get all of my application feedback in one place.
Is there a "best practices" way to do this? Or will I want/need to obtain all this output within my application and log it through "normal channels"?
Edit: I can do this with bash redirection per this question/answer, but I would still prefer to do it from within the application, if possible.
Edit: I suppose I should make more clear that I'm not asking about how to get the messages that go through the application's logging API to go to syslog. If there are errors in my QtQuick QML, the Qt runtime generates error and warning messages that get printed to stderr. It's those messages that I want to get redirected to the system logging facility.