Re: log4cxxl compile fails
Hi > C:\apr-util\dbd\apr_dbd_odbc.c(134) : error C2061: syntax error : > identifier 'SQLLEN' Are you using the correct apr and apr-util version (I use 1.2.12). As far as I can remember with the newest version of apr-util you get this error. Best regards, Markus Kappeler
RE: log4cxxl compile fails
I'm using apr-1.3.3-win32-src.zip and apr-util-1.3.4-win32-src.zip. I added 'typedef INT32 SQLLEN' to the file and then it compiled okay. I don't understand why I had to add it. Thanks! -Original Message- From: Markus Kappeler [mailto:[EMAIL PROTECTED] Sent: Thursday, September 25, 2008 2:11 AM To: log4cxx-user@logging.apache.org Subject: Re: log4cxxl compile fails Hi > C:\apr-util\dbd\apr_dbd_odbc.c(134) : error C2061: syntax error : > identifier 'SQLLEN' Are you using the correct apr and apr-util version (I use 1.2.12). As far as I can remember with the newest version of apr-util you get this error. Best regards, Markus Kappeler
TimeBased + SizeBased
I am trying to implement logging to rolling files. I want rollover to occur when the size reaches certain limit. At the same time I'd like file name to include date stamp, so the result looks like: MyLog.2008-09-08.log MyLog.2008-09-08.1.log MyLog.2008-09-08.2.log ... etc. I started with log4cxx::RollingFileAppender, but it doesn't seem to support FileName patterns. Next, I tried log4cxx::rolling::RollingFileAppender with TimeBasedRollingPolicy. This option does not allow rollover to be triggered by file size. Next, I tried log4cxx::rolling::RollingFileAppender with TimeBasedRollingPolicy and SizeBasedTriggeringPolicy, but it seemed to create a conflict because TimeBasedRollingPolicy also sets Triggering policy for the appender. What is the solution I am looking for? Alex Rozenbaum Consultant Thomson Reuters Phone: 646-822-2821 [EMAIL PROTECTED] thomsonreuters.com This email was sent to you by Thomson Reuters, the global news and information company. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Thomson Reuters.
Re: File system full causes log4cxx to crash
On 2008-09-23 11:21, Peter Steele wrote: /mnt: write failed, filesystem is full terminate called after throwing an instance of 'log4cxx::helpers::IOException' what(): IO Exception : status code = 28 Abort trap: 6 (core dumped) I'm stumped here. The only places I see an IOException thrown in 0.9.7 code are: * datagramsocket.cpp * properties.cpp There are some child classes, InterruptedIOException and SocketTimeoutException, and then children of those all defined in socketimpl.h. Since my sample app was using a FileAppender, I don't get how an IOException is thrown. Unfortunately, despite it saying a core was dumped, there doesn't seem to be a core file. Not sure how to proceed from here. Probably a limit you can configure with your shell. In bash it's ulimit -c unlimited to get full core dumps and ulimit -a to see the settings (0 bytes by default on my shell.) It and gdb might not be helpful anyway if your log4cxx library is stripped of debugging symbols. If you do pursue getting a core, please don't send it to me :). Install gdb and get the stack trace. I'm hoping someone else chimes in with ideas. I guess as a second test, you could try my non-log4cxx program against that full filesystem. Maybe modify a copy of it to try with an fstream. Both should fail gracefully. -- Jacob Anawalt Gecko Software, Inc. [EMAIL PROTECTED] 435-752-8026 // 2008-Sep-22 18:00 // Simple test application to see how stdc libraries // react to a full filesystem. // gcc -ofullfs-c fullfs.c #include /* open */ #include /* open */ #include /* printf */ #include /* write */ #include /* errno */ int main(void) { int i; int estat; int status; int fd; ssize_t bytes; const size_t bufSz = 8096; char buf[bufSz]; estat = 0; i = 0; fd = open("/mnt/test",O_WRONLY|O_TRUNC|O_CREAT); if(fd != -1) { printf("Opened file fd %d\n",fd); while(1) { bytes = write(fd,buf,bufSz); if(bytes == bufSz) { ++i; printf("Write block, filesize now %d\n",i*bufSz); } else if( bytes == -1 ) { status = errno; perror("write()"); printf("errno: %d\n"); estat = 1; break; } else { printf("Partial write of %d bytes\n",bytes); } }; } else { perror("open()"); estat = 1; /* failure */ } return estat; }
RE: File system full causes log4cxx to crash
>Probably a limit you can configure with your shell. In bash it's ulimit -c unlimited to get full core dumps and ulimit -a >to see the settings (0 bytes by default on my shell.) It and gdb might not be helpful anyway if your log4cxx library is >stripped of debugging symbols. If you do pursue getting a core, please don't send it to me :). Install gdb and get the >stack trace. We're a month from beta and I still have other bugs to fix, so I'm putting this one to rest for now...