Kodi Community Forum
Stdout and Stderr into XBMC Log File? - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93)
+--- Thread: Stdout and Stderr into XBMC Log File? (/showthread.php?tid=84326)



Stdout and Stderr into XBMC Log File? - dteirney - 2010-10-29

I've seen some Windows xbmc.log files that contain stdout messages from the libcmyth library in them.

All of the Linux logs I've seen don't have those same stdout error messages.

What needs to be done so stdout messages from a library used by XBMC shows up in the xbmc.log file?

Also, what would need to happen to have stderr messages automagically appear in the xbmc.log file?


- Anssi - 2010-10-30

I think this might do the trick (untested):
freopen("xbmc.log", "a", stdout);

However, this will completely redirect stdout to xbmc.log, and there will be no output in the actual stdout.

The proper solution would be for libraries to not output anything to stdout.