From: David R R. <drr...@op...> - 2002-05-29 12:06:02
|
I tried Testbench. It printed strings of length up to (and including) 128 characters just fine. However, it would not print strings of length 129 or greater. Note, however, this only applies when printing the strings as: log.error("%s", buffer); Any ideas? David R Robison Open Roads Consulting, Inc. -----Original Message----- From: Bastiaan Bakker [mailto:bas...@li...] Sent: Tuesday, May 28, 2002 6:09 PM To: David R Robison Cc: log...@li... Subject: Re: [Log4cpp-devel] Large strings in cat.debug() Hi David, Log4cpp does not have a maximum log string length. This sounds like a platform specific bug. The 'testbench' utility in the tests subdirectory is a simple way to try strings of arbitrary length: 'testbench 1 <length>'. Maybe it can help you to debug your problem. Good luck, Bastiaan Bakker On Tue, 2002-05-28 at 23:12, David R Robison wrote: > I'm trying to display a long string (~150bytes) using log4cpp V0.3.1. > The code is > > Cat.debug("CMD: %s (%d)", cmd, strlen(cmd)); > > 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? > > > Any help would be appreciated. > > Ps. I'm using BCB4 on NT4 > > David R Robison > Open Roads Consulting, Inc. > |