From: Bastiaan B. <Bas...@li...> - 2002-05-29 13:17:24
|
This looks like a limit in the snprintf() implementation on your = platform. To work around it you can configure log4cpp to use an = alternative snprint() implementation by removing the line '#define LOG4CPP_HAVE_SNPRINTF 1' in include/log4cpp/config-win32.h Good luck, Bastiaan > -----Original Message----- > From: David R Robison [mailto:drr...@op...] > Sent: Wednesday, May 29, 2002 2:04 PM > To: Bastiaan Bakker; 'Aaron Ingram' > Cc: log...@li... > Subject: RE: [Log4cpp-devel] Large strings in cat.debug() >=20 >=20 > I tried Testbench. It printed strings of length up to (and including) > 128 characters just fine. However, it would not print strings=20 > of length > 129 or greater. Note, however, this only applies when printing the > strings as: >=20 > log.error("%s", buffer); >=20 > Any ideas? >=20 > David R Robison > Open Roads Consulting, Inc. >=20 >=20 > -----Original Message----- > From: Bastiaan Bakker [mailto:bas...@li...]=20 > Sent: Tuesday, May 28, 2002 6:09 PM > To: David R Robison > Cc: log...@li... > Subject: Re: [Log4cpp-devel] Large strings in cat.debug() >=20 > Hi David, >=20 > Log4cpp does not have a maximum log string length. This sounds like a > platform specific bug.=20 > The 'testbench' utility in the tests subdirectory is a simple=20 > way to try > strings of arbitrary length: 'testbench 1 <length>'. Maybe it can help > you to debug your problem. >=20 > Good luck,=20 >=20 > Bastiaan Bakker >=20 > =20 > On Tue, 2002-05-28 at 23:12, David R Robison wrote: > > I'm trying to display a long string (~150bytes) using=20 > log4cpp V0.3.1. > > The code is > > =20 > > Cat.debug("CMD: %s (%d)", cmd, strlen(cmd)); > > =20 > > If I shorten the string cmd to 10 characters, then it prints > correctly. > > If, however, the string is long, then only the DEBUG tag prints. Is > > there some maximum to the length of a string with the %s flag? Is > there > > a way around this?=20 > >=20 > >=20 > > Any help would be appreciated. > > =20 > > Ps. I'm using BCB4 on NT4 > > =20 > > David R Robison > > Open Roads Consulting, Inc. > > =20 >=20 >=20 >=20 >=20 |