logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From carlos_jime...@encopim.com
Subject Problems executing application with log4cxx
Date Tue, 24 Nov 2009 12:05:43 GMT
Hello,

First, sorry for my english.

I'm new with log4cxx and I have problems. When I use  
PropertyConfiguration into my code, application crashes, but if I use  
BasicConfiguration, works fine.

#include <log4cxx/logger.h>
#include <log4cxx/propertyconfigurator.h>
#include "Sistema/SistemaRTEST4Cilindres.h"

using namespace log4cxx;

LoggerPtr logger(Logger::getLogger("main"));

int main(int argc, char *argv[]){
     SistemaRTEST4Cilindres *sistema=NULL;

     PropertyConfigurator::configure("/etc/rtai/log/log4cxx.properties");

     LOG4CXX_FATAL(logger, '\n');
     LOG4CXX_INFO(logger, "Programa main(): Cargamos el sistema");

....


/etc/rtai/log/log4cxx.properties

# Sample ResourceBundle properties file
log4j.rootLogger=INFO, R

log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=/var/log/rtaid.log

log4j.appender.R.MaxFileSize=200KB
log4j.appender.R.MaxBackupIndex=10

log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%d [%t] %-3p (%F:%L) - %m%n

log4j.logger.Cicle=WARN
log4j.logger.DadesFase=WARN
log4j.logger.Fase=WARN
log4j.logger.Modul=WARN
log4j.logger.Sistema=WARN
#log4j.logger.Sistema.RTEST=WARN
log4j.logger.Transicions=WARN
#log4j.logger.ServidorDades=WARN


My host OS is Debian, someone have any idea??

Thank you.


-- 
Carlos Jiménez

ENCOPIM S.L.
C/. del Parc 5 (nau 13), P.I. Els Pinetons
E-08291 RIPOLLET (Barcelona)
Tel: (+34) 935 94 23 47
Fax: (+34) 935 94 64 15

==========================================================
La información contenida en la presente transmisión es confidencial y su
uso únicamente está permitido a su(s) destinatario(s). Si Ud. no es la
persona destinataria de la presente transmisión, rogamos nos lo
comunique de manera inmediata por teléfono (+34 935 942 347) y destruya
cualquier copia de la misma (tanto digitales como en papel).

The information contained in this transmission is confidential and is
intended only for the use of the addressee(s). If you are not the
designated recipient of this transmission, please advise us immediately
by telephone (+34 935 942 347) and destroy any copies (digital and
paper).
==========================================================

Mime
View raw message