Jump to content


Photo

logging in php


  • Please log in to reply
1 reply to this topic

#1 tinks

tinks

    Young Padawan

  • Members
  • Pip
  • 8 posts

Posted 03 January 2011 - 10:26 PM

hi,

i'm using the log4php for my logging.
specifically the LoggerAppenderDailyFile
but it could not create the logfile successfully.

i'veattached my files.. php_and_xml.txt


did i miss out on somehting?

my php version is php5.1.X
and im using the log4php 2.0.0-incubating.

does the version has any effect?

thanks a lot.

Attached Files



#2 rc69

rc69

    PHP Master PD

  • P2L Staff
  • PipPipPipPip
  • 3,827 posts
  • Gender:Male
  • Location:Here
  • Interests:Web Development

Posted 04 January 2011 - 12:15 AM

I have minimal experience with log4j, and none with log4php, so i doubt i'll be able to help much. However, i do have a few questions:
1. What do you mean you say it doesn't successfully create the file? Do you get any errors? If so, what are they?
2. Are there any errors of any kind that get printed to the screen? If not, are you sure the program runs through to completion?
3. Is your XML config file really missing a '<' right at the beginning, or is that a copy/paste error?

As a general observation, i noticed that your configuration file sets the log level to debug, and you are attempting to log a debug statement, so in an ideal world that should work. If you are sure the program runs through to completion, and there are no other noticable errors, perhaps you could try making a fatal log entry as opposed to a debug log entry, as fatal should always be logged unless you explicitly say not to.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users