Questions tagged [log4php]

Apache log4php is a versatile logging framework for PHP.

Apache log4php is a versatile logging framework for PHP.

Features:

  • Configuration through XML, properties or PHP files
  • Various logging destinations, including:
    • Console (stdout, stderr)
    • Files (including daily and rolling files)
    • Email
    • Databases
    • Sockets
    • Syslog
  • Several built-in log message formats, including:
    • HTML
    • XML
    • User defined pattern
  • Nested (NDC) and Mapped (MDC) Diagnostic Contexts.

Official Website: http://logging.apache.org/log4php/

Useful Links:

92 questions
8
votes
4 answers

How to output exception information in log file with log4php?

I have set up log4php to log to a file using the LoggerAppenderRollingFile appender and the LoggerLayoutTTCC layout. When I log an exception, however, it doesn't display the exception details such as the stack trace like I'm used to seeing in…
g .
  • 8,110
  • 5
  • 38
  • 48
4
votes
4 answers

Logging/tracking in PHP: Scribe, Chukwa, log4php?

This is probably a pretty high-level question that requires a lot of explaining, but I'm in need of a lot of explaining. Basically I'm developing a PHP application that requires a lot of logging and tracking. Tracking clicks, interactions,…
Josh Smith
  • 14,674
  • 18
  • 72
  • 118
4
votes
0 answers

Log4PHP only logging last method call

I'm a relatively new PHP programmer, my background is in Java. My question involves attempting to log function call entry and exits using Log4PHP. I am following a loose MVC pattern where I have PHP pages that render the view, PHP scripts to act as…
ForIEq0
  • 41
  • 2
4
votes
0 answers

Autoload class issue with Restler and log4php

I am having some trouble with creating my API using Restler while using log4php. It seems to be a clash in the autoloaders but I am not certain. For reference I will try just showing the relevant code sections so it will hopefully help. In…
3
votes
1 answer

How can I implement "object dumping" with log4php?

I'm currently in the process of moving from our own proprietary logging solution to log4php in one of our projects. Our own solution has a helper method which I posted below. The purpose of the method is to write the contents of a variable (and any…
Oliver Salzburg
  • 21,652
  • 20
  • 93
  • 138
2
votes
2 answers

How to configure SMTP on log4php?

How do I specify smtp host on log4php I will be using it with gmail using the following configurations. smtp.gmail.com (use authentication) Use Authentication: Yes Port for TLS/STARTTLS: 587 Port for SSL: 465
Aivan Monceller
  • 4,636
  • 10
  • 42
  • 69
2
votes
1 answer

How to configure log4php to log different log levels to different files for the same logger

I have a normal DEBUG level log for application. What I need is to additionally log all ERROR level events to separate error log. I am using configuration like this:
Himanshu
  • 1,433
  • 4
  • 24
  • 35
2
votes
2 answers

separate output for different log levels in log4php

im kinda new with log4php.. i need to output the INFO and DEBUG levels in different files. is that possible? my xml looks like this:
tinks
  • 23
  • 1
  • 7
2
votes
1 answer

Allow instantiated class to access class include in creator

I have my main PHP file which is run whenever someone hits my server. It looks something like this:
Keith M
  • 1,199
  • 2
  • 18
  • 38
2
votes
1 answer

log4php configure log directory

I'm configuring log4php with xml. Here my configuration:
Stefano Giacone
  • 2,016
  • 3
  • 27
  • 50
2
votes
0 answers

How to use log4php inside a thread

I am trying to use log4php inside a thread, as I don't want to re-create the wheel of a logger. However, that doesn't work :(
Stilgar
  • 124
  • 1
  • 8
2
votes
2 answers

log4php is anti-intuitive (was not honouring logger levels)

I am trying to use log4php and having a problems understanding the configuration, I am comparing the behaviour from a log4j xml to a log4php xml that are the same. The same code. But with different outputs. From the documentation I would expect 5…
Javier
  • 49
  • 6
2
votes
3 answers

Important but non-fatal log messages in logging frameworks (log4j, log4net, log4php, log4cxx, NLog)

In certain applications, there are important messages you always want to log (such as the application starting up and shutting down) regardless of the current log level setting. The only way to ensure an important message is logged using frameworks…
SharpC
  • 6,974
  • 4
  • 45
  • 40
2
votes
0 answers

Logging to php error_log in Windows 7

I want my log4php logger to log to the same logfile that error_log() logs to - under Windows. I've had this working on previous (much older) versions of log4php using the config below. However now I can't read the file due to permission errors and…
SuprF1y
  • 100
  • 5
2
votes
2 answers

log4php : Cannot create log file

I use log4php to write file logs. Here is the configuration file:
Raptor
  • 53,206
  • 45
  • 230
  • 366
1
2 3 4 5 6 7