glog
glog copied to clipboard
How to log to console along with file output?
I want to see program output in VS's output window but can't figure out how to do that. I tried to set FLAGS_alsologtostderr
but this doesn't work for me. I'm using windows, so cannot use utils like tee
@xahon debug the logging_unittest project as a test, you can comment out the second line code of "//CaptureTestStderr();" that in the main fucntion. hope that helps
Setting FLAGS_alsologtostderr
to true
should be sufficient:
https://github.com/google/glog/blob/4244cec1405fcd46e6efc915a35b74c150b1c600/src/logging.cc#L841-L846
Please make sure that the flag is indeed set correctly.