logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From srkraju <rama...@cmcltd.com>
Subject RE: URGENT compilation error of sample program
Date Mon, 16 Jun 2008 06:22:50 GMT
Thanks Mr. Arnold. 
I am able to write simple configuration files for sample c++ programs.
I am able to view the log files when I used
		1. Log4j.appender.A1=org.apache.log4j.ConsoleAppender
		2. Log4j.appender.A2=org.apache.log4j.FileAppender
		3. log4j.appender.A3=org.apache.log4j.RollingFileAppender

	But when I configure like
		log4j.rootLogger=DEBUG, A4


		log4j.appender.A4.layout.ConversionPattern=[%5p] %d{mm:ss} 

its giving the following error:
	log4cxx: Could not parse configuration file [Conf3.xml].
	log4cxx: Illegal state
	log4cxx: No appender could be found for logger (Conf3.xml).
	log4cxx: Please initialize the log4cxx system properly.
Any  Idea? Shall we have to use other keyword instead of 'Daily'	 in
the configuration file? Please find the version info in this mail.

thanks& regards

~-----Original Message-----
~From: Curt Arnold [mailto:carnold@apache.org]
~Sent: Sunday, June 15, 2008 1:50 AM
~To: Log4CXX User
~Subject: Re: URGENT compilation error of sample program
~On Jun 14, 2008, at 6:58 AM, srkraju wrote:
~> Thanks Mr. Dale.
~> I solved the link error problem by location the shared objects
~> generated by
~> Log4Cxx_0.10.0, Apr_1.2.2, Apr-Util_1.2.2 packages. [ Redhat
~> Enterprise
~> Linux AS5, g++ version 4.1.1]
~> I am trying to run the sample programs (bar.h, bar.cpp, MyApp2 given
~> in the
~> link
~> 		http://logging.apache.org/log4cxx/index.html
~> I am not getting the output exactly as expected.
~> When I don't pass any argument it's giving
~> 		[facts@localhost Examples_srk]$ ./MyApp2
~> 			0 [0xb7faaa20] INFO MyAppSrk null - Entering
~> application.
~> 			0 [0xb7faaa20] DEBUG com.foo.bar null - Did it
~> again!
~> 			0 [0xb7faaa20] INFO MyAppSrk null - Exiting
~> application.
~> When I pass one argument it's giving
~> 		[facts@localhost Examples_srk]$ ./MyApp2 TestFile
~> 			log4cxx: Could not read configuration file
~> [TestFile].
~> 			log4cxx: No appender could be found for logger
~> (MyAppSrk).
~> 			log4cxx: Please initialize the log4cxx system
~> properly
~> I understand that the configuration file is not properly written.
~> What is
~> the format to write the configuration file? Can anybody give a
~> template of
~> configuration file? I also tried with the configuration file given
~> in the
~> above link. Still it is giving the same output.
~Is there a file named TestFile in your current working directory?
~log4cxx is reporting that you told it to read "TestFile" from the
~current working directory and use it as its configuration and the file
~could not be found.  There is an example of what the contents of the
~configuration file could look like following the source of MyApp2.cpp
~in the tutorial.  You should save that as TestFile and place that in
~the current directory.


“The information contained in this e-mail message and/or attachments to it may contain confidential
or privileged information. If you are not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the information contained in this e-mail message
and/or attachments to it are strictly prohibited. If you have received this communication
in error, please notify us by reply e-mail or telephone and immediately and permanently delete
the message and any attachments. Thank you"

View raw message