logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wesley J. Miller" <WMil...@sdr.com>
Subject Re: C++ using Qt and Log4cxx does not show in console
Date Tue, 21 May 2013 19:13:44 GMT
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/yyyy 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.

Mime
View raw message