Search code examples
phploggingsymfony1

how can I change log file path and name in symfony which uses sfLogger class


I am using symfony 1.x framework and usually all the logs are put under repective applications /log/_dev/prod.log

But I want to change the log file name and path and where can I configure it.

I have got a liitle more info here

but it is not given here about the file path and name config.


Solution

  • I have got a solution for this.

    $log = new sfFileLogger();
    $log->initialize(array ('file' => '<path with file name>',));
    $log->log($message, $level);
    

    Thanks