symfony API

sfLogger Class

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to API menu

Packages

You are currently browsing the symfony API for the 1.4 version. Switch to:
This version of symfony is not maintained anymore.
If some of your projects still use this version, consider upgrading as soon as possible.

sfLogger is the abstract class for all logging classes.

Method Summary

  • alert($message)
    Logs an alert message.
  • crit($message)
    Logs a critical message.
  • debug($message)
    Logs a debug message.
  • doLog($message, $priority)
    Logs a message.
  • emerg($message)
    Logs an emerg message.
  • err($message)
    Logs an error message.
  • string getLogLevel()
    Retrieves the log level for the current logger instance.
  • getOptions()
    Returns the options for the logger instance.
  • string getPriorityName($priority)
    Returns the priority name given a priority class constant
  • info($message)
    Logs an info message.
  • Boolean initialize($dispatcher, $options)
    Initializes this sfLogger instance.
  • listenToLogEvent($event)
    Listens to application.log events.
  • log($message, $priority)
    Logs a message.
  • notice($message)
    Logs a notice message.
  • setLogLevel($level)
    Sets a log level for the current logger instance.
  • setOption()
    Returns the options for the logger instance.
  • shutdown()
    Executes the shutdown procedure.
  • warning($message)
    Logs a warning message.
  • __construct()
    Class constructor.

Method Details

  • alert ($message)

    $message Message

    Logs an alert message.

  • crit ($message)

    $message Message

    Logs a critical message.

  • debug ($message)

    $message Message

    Logs a debug message.

  • doLog ($message, $priority)

    $message Message
    $priority Message priority

    Logs a message.

  • emerg ($message)

    $message Message

    Logs an emerg message.

  • err ($message)

    $message Message

    Logs an error message.

  • (string) getLogLevel ()

    Retrieves the log level for the current logger instance.

    returns Log level

  • getOptions ()

    Returns the options for the logger instance.

  • (string) getPriorityName ($priority)

    $priority A priority class constant

    Returns the priority name given a priority class constant

    returns The priority name

    throws sfException if the priority level does not exist

  • info ($message)

    $message Message

    Logs an info message.

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

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

    Initializes this sfLogger instance.


    Available options:

    - level: The log level.

    returns true, if initialization completes successfully, otherwise false.

    throws sfInitializationException If an error occurs while initializing this sfLogger.

  • listenToLogEvent ($event)

    $event An sfEvent instance

    Listens to application.log events.

  • log ($message, $priority)

    $message Message
    $priority Message priority

    Logs a message.

  • notice ($message)

    $message Message

    Logs a notice message.

  • setLogLevel ($level)

    $level Log level

    Sets a log level for the current logger instance.

  • setOption ()

    Returns the options for the logger instance.

  • shutdown ()

    Executes the shutdown procedure.


    Cleans up the current logger instance.

  • warning ($message)

    $message Message

    Logs a warning message.

  • __construct ()

    Class constructor.