On Windows there is OutputDebugString function, how do I do the same on Linux?
Update: stderr and stdlog is not what I want. Those are redirected to stdout.
P. S. And syslog
is no different.
I'm not sure what OutputDebugString
does exactly, but standard C++ defines the standard error stream std::cerr
and the standard logging stream std::clog
. Both are declared in the header <iostream>
.
These are by default tied to the same file descriptor in Linux; the difference is that cerr
is unbuffered, while clog
is buffered (I believe it's line-buffered).
There is no notion of a "system debugger" in Linux. If you want to write to the system log, you can use syslog(3)
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With