You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4cxx-user@logging.apache.org by Owen Corpening <oc...@acornsys.com> on 2005/05/09 22:47:37 UTC

not getting logfile

pulling hair out
tried everything, this stuff is just copied out of the docs. I am expecting
to get a file "example.log", console output is not possible in this
situation. If I change the path to the property file it fails, as expected.
So at least I believe that is getting read in. I have tried specifying full
path to example.log also. Tried LOG4CXX_DEBUG.

here is some of the code:
extern "C" UINT __stdcall ValidateActuateiServerSettings(MSIHANDLE hInstall)
{
char ServerPort[MAX_PATH];
DWORD ServerPortLen = MAX_PATH;
//BasicConfigurator::configure();
PropertyConfigurator::configure(LOG4CXX_FILE("C:\\development\\head\\EPS\\In
stall\\install\\AcornActuate\\log4cxx.properties"));
LoggerPtr rootLogger = Logger::getRootLogger();
LOG4CXX_INFO(rootLogger, "Entering ValidateActuateiServerSettings");

here is some of the property file:

log4j.rootLogger=debug, stdout, R

log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout

# Pattern to output the caller's file name and line number.
log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n

log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File="example.log"



thanks,

owen




Re: not getting logfile

Posted by Owen Corpening <oc...@acornsys.com>.
Nope, still no logfile, but thanks! I had forgotten to even suspect the
logging code, I had assumed it was my mistake.

changed to:
log4j.rootLogger=debug, stdout, R
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
# Pattern to output the caller's file name and line number.
log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n
log4j.appender.R=org.apache.log4j.FileAppender
log4j.appender.R.File="/example.log"

but still no love

owen

"Curt Arnold" <ca...@houston.rr.com> wrote in message
news:1db0cd27ec517becc5feb1b5ac3af120@houston.rr.com...
> RollingFileAppender is stubbed out in log4cxx at the moment in
> anticipation of porting over the log4j 1.3 new Rolling File framework.
> Try using a FileAppender.  Should have RFA's on-line within the week.
>
>




Re: not getting logfile

Posted by Curt Arnold <ca...@houston.rr.com>.
RollingFileAppender is stubbed out in log4cxx at the moment in 
anticipation of porting over the log4j 1.3 new Rolling File framework.  
Try using a FileAppender.  Should have RFA's on-line within the week.