c++ - Using log4cxx with a Qt library -
good afternoon guys,
i'm working on project using qt library in visual studio 2008. in project using log4cxx 0.10.0 working fine. however, unable display in (this projects) console. believe reason has being win32 application.
anyone familiar log4j(cxx) knows there properties file configure.
within file, have writing console, nothing displayed. .cmd won't pop other programs have written, , not display in vs console qdebug().
any ideas on how go fixing this?
qdebug
writing stderr
, while printf
or log functions connected stdout
.
show console in visual studio
you have 2 different ways show black console/terminal window visual studio:
one: visual c++ enable console
add following somewhere in program before start printing out console:
#include <stdio.h> // ... allocconsole(); freopen("conin$","r",stdin); freopen("conout$","w",stdout); freopen("conout$","w",stderr); // printf("debugging window:\n");
or can tell visual studio writing console program , make 1 you.
show console window when debugging win32 mfc application in vs2010
project > properties > configuration properties > linker > system > subsystem
(this navigation find setting in vs 2010, may little different vs 2008)
change windows (/subsystem:windows)
console (/subsystem:console)
.
redirect stderr
or stdout
or third option try logging print stderr
, qdebug
.
http://cboard.cprogramming.com/c-programming/26852-stderr-vs-stdout.html
file *myerr = freopen("error.log", "wb", stderr);
hope helps.
Comments
Post a Comment