Re: How to clean up the log4cxx objects to avoid the memory leak?

2009-10-14 Thread deepak singh
;close(); > > //close all appenders associated with the logger > _loggerPtr->closeNestedAppenders(); > _loggerPtr->removeAllAppenders(); > > Or some other APIs I need to call to release all resources to avoid memory > leak? > > Thank you. > 2009/10/14 deepak si

Re: How to clean up the log4cxx objects to avoid the memory leak?

2009-10-13 Thread deepak singh
You should use smart pointer instead. e.g log4cxx::LogManager::resetConfiguration(); log4cxx::LayoutPtr layoutPtr(new log4cxx::PatternLayout("%c-%p (%d{dd MMM HH:mm:ss}) [%-5t] %m%n")); log4cxx::AppenderPtr appenderPtr( new log4cxx::ConsoleAppender(layoutPtr, "System.err")); log4

Re: multiple lines of output for the same logging event

2009-08-29 Thread deepak singh
one quick solution would be call reset before every configure call you are making. On Sun, Aug 30, 2009 at 9:24 AM, Curt Arnold wrote: > > On Aug 29, 2009, at 1:08 PM, vasile.jures...@sophia.inria.fr wrote: > > On Saturday 29 August 2009 21:01:37 deepak singh wrote: >> >&

Re: multiple lines of output for the same logging event

2009-08-29 Thread deepak singh
The reason could be you are initializing the logger multiple times. Can you send the code where you are initializing the logger and make sure that part of code is called just once during entire execution. Thanks Deepak On Sat, Aug 29, 2009 at 10:57 PM, wrote: > Hello, > > I am using a simple con

Segmentation fault from log4cxx on 64 bit platform

2009-07-15 Thread deepak singh
Hi, I am getting segmentation fault from log4cxx when running on 64 bit platform (linux). Though its working fine on 32 bit machine. Can you please help me out? gdb back trace output:--- #0 apr_pool_create_ex (newpool=0x8b1940, parent=0x8b8418, abort_fn=0, allocator=0x8b4300) at memory/unix/

log4cxx::NDC::cloneStack() and inherit() functions missing in 0.10.0

2009-06-23 Thread deepak singh
> > hi, >log4cxx::NDC::cloneStack() and inherit() functions are missing from > 0.10.0. >Is there any work around for these functions in the 0.10.0. >I want to inherit the NDC stack of the parent thread to the child > thread. > Thanks Deepak

cloneStack() and inherit() functions missing in 0.10.0

2009-06-23 Thread deepak singh
hi, log4cxx::NDC::cloneStack() and inherit() functions are missing from 0.10.0. Is there any work around for these functions in the 0.10.0. I want to inherit the NDC stack of the parent thread to the child thread. Thanks Deepak

NDC stack of parent thread visible to child thread??

2009-06-23 Thread deepak singh
Hi, Is there any way through which I can inherit the NDC stack to the child thread? I have a parent thread running and create a child thread, I want the NDC stack of the parentthread should also be applied to the child thread. Please let me know if we have anyway to do that? Thnaks Deepak

Re: Issue with using NDC (nested diagnostic contexts)

2009-06-15 Thread deepak singh
quot;System.err")); log4cxx::BasicConfigurator::configure(appenderPtr); Thanks Deepak On Mon, Jun 15, 2009 at 5:43 PM, Assaf Lavie wrote: > What format pattern are you using? > > > On Mon, Jun 15, 2009 at 3:11 PM, deepak singh wrote: > >> Hi, >> I am using NDC (

Issue with using NDC (nested diagnostic contexts)

2009-06-15 Thread deepak singh
Hi, I am using NDC (*nested diagnostic contexts*) for appending the text from a specific thread. Using floowing code: - //In side the run method of that thread log4cxx::NDC::push("Thread specific Info"); printing some log4cxx messages... //Just before exitin

Re: Log4cxx output redirect to stderr (linux)

2009-05-30 Thread deepak singh
thanks Assaf, it works On Sat, May 30, 2009 at 8:38 PM, Assaf Lavie wrote: > See this page on "System.err": > > http://logging.apache.org/log4cxx/apidocs/classlog4cxx_1_1_console_appender.html > > > On Sat, May 30, 2009 at 2:32 PM, deepak singh wrote: > >>

Log4cxx output redirect to stderr (linux)

2009-05-30 Thread deepak singh
Hi, Do we have any config option in log4cxx to redirect log4cxx output to stderr on linux? Thanks Deepak

How to print there ID in decimal

2009-05-27 Thread deepak singh
I am using following pattern layout, Using [%-5t] to print the thread name which prints in hexadecimal. Is there any way to print thread ID in decimal. log4cxx::PatternLayout("%c-%p (%d{dd MMM HH:mm}) [%-5t] %m%n") Thanks Deepak

Issue with log4cxx configuration

2009-05-22 Thread deepak singh
Hi, I am using property file to configure the log4cxx. I am not able to check the correctness of the input file. I tried the try, catch but PropertyConfigurator::configure function is not throwing any exception. I passed the dummy property file and in this case configure file printing followi