File name in log file

2011-06-10 Thread Mohit Srivastava
Hi all, I write a wrapper over log4php api named as loggerimplementation.php Now i faced a problem in log files. When i called a function for logging defined in loggerimplementation. Log file generated as: 2011-06-10 10:49:17 [INFO] Log4phpTest: Hello (at C:\xampp\htdocs\logger\Loggerimplementa

Re: File name in log file

2011-06-10 Thread Christian Grobmeier
Hi, can you show us the Logging code? Esspecially the Logger::getLogger code is of interest. Thanks Christian On Fri, Jun 10, 2011 at 12:53 PM, Mohit Srivastava wrote: > Hi all, > > I write a wrapper over log4php api named as loggerimplementation.php > > Now i faced a problem in log files. Whe

Re: File name in log file

2011-06-10 Thread Mohit Srivastava
callerClass=$ClassName; if($this->callerClass==NULL) throw new NullValueException('Caller Class Value is NULL'); $loggerConfig = 'log4php/xml/config.xml'; Logger::configure($loggerConfig); $this->loggerObj = Logger::getLogger($this->callerClass);

Re: File name in log file

2011-06-10 Thread Mohit Srivastava
Hi Christian, This is my config file: http://logging.apache.org/log4php/";> The bold characters are responsible for filename in log file. As it called from loggerimplementation.php. So,

Re: File name in log file

2011-06-10 Thread Ivan Habunek
Yes you can, but you have to do it manually in your wrapper class. %F and %L will always return the values from where the logging function was called. In your case the wrapper. If you remove %F and %L from the pattern, you can append the location info you need manually. Something like this: --beg

Re: File name in log file

2011-06-10 Thread Mohit Srivastava
Thanks it works. On Fri, Jun 10, 2011 at 5:51 PM, Ivan Habunek wrote: > Yes you can, but you have to do it manually in your wrapper class. %F > and %L will always return the values from where the logging function > was called. In your case the wrapper. > > If you remove %F and %L from the pattern