Re: C++ using Qt and Log4cxx does not show in console
Mike, Hee is the logs.config file I use. To turn on logging to console just add, stdout to the first line like this: log4j.rootLogger=INFO, File, stdout -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- log4j.rootLogger=INFO, File log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n log4j.appender.File=org.apache.log4j.RollingFileAppender log4j.appender.File.File=logs/system.logs log4j.appender.File.MaxFileSize=1MB log4j.appender.File.MaxBackupIndex=10 log4j.appender.File.layout=org.apache.log4j.PatternLayout log4j.appender.File.layout.ConversionPattern=%d{MM/dd/ HH:mm:ss:SSS a} %p %c %m%n =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Subject: C++ using Qt and Log4cxx does not show in console I am attempting to use log4cxx to write to the Visual Studio (2008) console. However, I am using a Qt library in a Win 32 application that does not use (and won't work) std::cout or std::cerr to print to the console . I know in the properties file you are able to create you own appenders. How would I go about doing this to get it to display in the console or is there a better way to approach this? Regards, Mike CONFIDENTIALITY NOTE: This e-mail and any attachments are confidential. If you are not the intended recipient, be aware that any disclosure, copying, distribution or use of this e-mail or any attachment is prohibited. If you have received this e-mail in error, please notify us immediately by returning it to the sender and delete this copy from your system. Thank you for your cooperation.
Re: C++ using Qt and Log4cxx does not show in console
On 5/21/2013 11:44 AM, Mike wrote: I am attempting to use log4cxx to write to the Visual Studio (2008) console. Do you mean the VS debug output window via OutputDebugString, or are you talking about a standard console via AllocConsole or a Win32 console application? -- Jacob Anawalt Gecko Software, Inc. janaw...@geckosoftware.com 435-752-8026
Re: C++ using Qt and Log4cxx does not show in console
I am trying to write to the Output console that is dock able on the bottom of the screen. It says Show output from: Build, Build Order, Debug If I do a qDebug() this goes there. However, in a test application when using the standard C++ library with log4cxx all output for the console would go to a typical cmd prompt. I am fine using either or. Regards, -Mike --- On Tue, 5/21/13, Jacob L. Anawalt janaw...@geckosoftware.com wrote: From: Jacob L. Anawalt janaw...@geckosoftware.com Subject: Re: C++ using Qt and Log4cxx does not show in console To: log4cxx-user@logging.apache.org Date: Tuesday, May 21, 2013, 3:37 PM On 5/21/2013 11:44 AM, Mike wrote: I am attempting to use log4cxx to write to the Visual Studio (2008) console. Do you mean the VS debug output window via OutputDebugString, or are you talking about a standard console via AllocConsole or a Win32 console application? -- Jacob Anawalt Gecko Software, Inc. janaw...@geckosoftware.com 435-752-8026
Re: C++ using Qt and Log4cxx does not show in console
Yes, I currently have this set up (and working) in a test application which only uses the standard C++ library that is also a console application as opposed to an actual application project. For the test application, it will write as intended to the console among other files. I believe these two have a different approach to being able to write to the console(perhaps I am mistaken.) However, as you have your properties (and I have mine) it will not work for this project. Regards-Mike --- On Tue, 5/21/13, Wesley J. Miller wmil...@sdr.com wrote: From: Wesley J. Miller wmil...@sdr.com Subject: Re: C++ using Qt and Log4cxx does not show in console To: Log4CXX User log4cxx-user@logging.apache.org Date: Tuesday, May 21, 2013, 3:13 PM Mike, Hee is the logs.config file I use. To turn on logging to console just add , stdout to the first line like this: log4j.rootLogger=INFO, File, stdout -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- log4j.rootLogger=INFO, File log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n log4j.appender.File=org.apache.log4j.RollingFileAppender log4j.appender.File.File=logs/system.logs log4j.appender.File.MaxFileSize=1MB log4j.appender.File.MaxBackupIndex=10 log4j.appender.File.layout=org.apache.log4j.PatternLayout log4j.appender.File.layout.ConversionPattern=%d{MM/dd/ HH:mm:ss:SSS a} %p %c %m%n =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Subject: C++ using Qt and Log4cxx does not show in console I am attempting to use log4cxx to write to the Visual Studio (2008) console. However, I am using a Qt library in a Win 32 application that does not use (and won't work) std::cout or std::cerr to print to the console . I know in the properties file you are able to create you own appenders. How would I go about doing this to get it to display in the console or is there a better way to approach this? Regards, Mike CONFIDENTIALITY NOTE: This e-mail and any attachments are confidential. If you are not the intended recipient, be aware that any disclosure, copying, distribution or use of this e-mail or any attachment is prohibited. If you have received this e-mail in error, please notify us immediately by returning it to the sender and delete this copy from your system. Thank you for your cooperation.
Re: C++ using Qt and Log4cxx does not show in console
Guten Tag Mike, am Dienstag, 21. Mai 2013 um 19:44 schrieben Sie: I am attempting to use log4cxx to write to the Visual Studio (2008) console. However, I am using a Qt library in a Win 32 application that does not use (and won't work) std::cout or std::cerr to print to the console . Could you give some more details about why your QT library doesn't support stdout/stderr or what it is doing with those? Maybe one can provide some alternatives, but doesn't know exactly what the problem with the QT library is. Mit freundlichen Grüßen, Thorsten Schöning -- Thorsten Schöning E-Mail:thorsten.schoen...@am-soft.de AM-SoFT IT-Systeme http://www.AM-SoFT.de/ Telefon...05151- 9468- 55 Fax...05151- 9468- 88 Mobil..0178-8 9468- 04 AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow