sfFileLogger logs messages in a file.
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 , getPriorityName , info , initialize , listenToLogEvent , log , notice , setLogLevel , 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.
-
Executes the shutdown method.
|