symfony API

sfFileLogger Class

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to API menu

1.4 API OpenSearch

Packages

You are currently browsing the symfony API for the 1.4 version. Switch to:

sfFileLogger logs messages in a file.

Inheritence

sfFileLogger  <  sfLogger

Method Summary

  • doLog($message, $priority)
    Logs a message.
  • string getPriority($priority)
    Returns the priority string to use in log messages.
  • Boolean initialize($dispatcher, $options)
    Initializes this logger.
  • shutdown()
    Executes the shutdown method.

Methods inherited from sfLogger

alert , crit , debug , doLog , emerg , err , getLogLevel , getOptions , getPriorityName , info , initialize , listenToLogEvent , log , notice , setLogLevel , setOption , shutdown , warning , __construct

Method Details

  • doLog ($message, $priority) Browse code

    $message Message
    $priority Message priority

    Logs a message.

  • (string) getPriority ($priority) Browse code

    $priority The priority constant

    Returns the priority string to use in log messages.

    returns The priority to use in log messages

  • (Boolean) initialize ($dispatcher, $options) Browse code

    $dispatcher A sfEventDispatcher instance
    $options An array of options.

    Initializes this logger.


    Available options:

    - file: The file path or a php wrapper to log messages
    You can use any support php wrapper. To write logs to the Apache error log, use php://stderr
    - format: The log line format (default to %time% %type% [%priority%] %message%%EOL%)
    - time_format: The log time strftime format (default to %b %d %H:%M:%S)
    - dir_mode: The mode to use when creating a directory (default to 0777)
    - file_mode: The mode to use when creating a file (default to 0666)

    returns true, if initialization completes successfully, otherwise false.

  • shutdown () Browse code

    Executes the shutdown method.