Class Zend_Log_Adapter_File

Description

Implements interfaces:

  • license: New BSD License
  • copyright: Copyright (c) 2005-2007 Zend Technologies USA Inc. (http://www.zend.com)

Located in /Zend/Log/Adapter/File.php (line 41)


	
			
Method Summary
 Zend_Log_Adapter_File __construct ( $filename, [ $accessMode = 'a'])
 void __destruct ()
 bool close ()
 bool flush ($message 0, $level 1)
 bool open ([$filename $filename = null], [$accessMode $accessMode = null])
 bool setOption ($optionKey $optionKey, $optionValue $optionValue)
 bool write ($message $fields, $level 1)
 string _parseLogLine ( $fields, string $message, int $level)
 bool _setAccessMode ($accessMode $accessMode)
Methods
Constructor __construct (line 114)

Class Constructor

  • var: Name of the file on the filesystem to write the log.
  • access: public
Zend_Log_Adapter_File __construct ( $filename, [ $accessMode = 'a'])
  • $filename
  • $accessMode
Destructor __destruct (line 127)

Class Destructor

Always check that the file has been closed and the buffer flushed before destruction.

  • access: public
void __destruct ()
close (line 282)

Closes the file resource for the logfile. Calling this function does not write any buffered data into the log, so flush() must be called before close().

  • return: True
  • access: public
bool close ()

Implementation of:
Zend_Log_Adapter_Interface::close()
Close the log storage opened by the log adapter. If the adapter supports buffering, all log data must be sent to the log before the storage is closed.
flush (line 244)

Write a message to the log. This function really just writes the message to the buffer.

  • return: True
  • access: public
bool flush ($message 0, $level 1)
  • $message 0: Log message
  • $level 1: Log level, one of Zend_Log::LEVEL_* constants
open (line 178)

Opens the logfile for writing.

  • return: True
  • access: public
bool open ([$filename $filename = null], [$accessMode $accessMode = null])
  • $filename $filename: Filename to open
  • $accessMode $accessMode: Either "w"rite or "a"ppend

Implementation of:
Zend_Log_Adapter_Interface::open()
Open the storage resource. If the adapter supports buffering, this may not actually open anything until it is time to flush the buffer.
setOption (line 160)

Sets an option specific to the implementation of the log adapter.

  • return: True
  • access: public
bool setOption ($optionKey $optionKey, $optionValue $optionValue)
  • $optionKey $optionKey: Key name for the option to be changed. Keys are adapter-specific
  • $optionValue $optionValue: New value to assign to the option

Implementation of:
Zend_Log_Adapter_Interface::setOption()
Sets an option specific to the implementation of the log adapter.
write (line 205)

Write a message to the log. This function really just writes the message to the buffer.

If buffering is enabled, the message won't hit the filesystem until the buffer fills or is flushed. If buffering is not enabled, the buffer will be flushed immediately.

  • return: True
  • access: public
bool write ($message $fields, $level 1)
  • $level 1: Log level, one of Zend_Log::LEVEL_* constants
  • $message $fields: Log message

Implementation of:
Zend_Log_Adapter_Interface::write()
Write a message to the log. If the adapter supports buffering, the message may or may not actually go into storage until the buffer is flushed.
_parseLogLine (line 228)

Format a line before sending into the storage.

  • access: protected
string _parseLogLine ( $fields, string $message, int $level)
  • string $message
  • int $level
  • $fields
_setAccessMode (line 140)

Sets the access mode of the log file on the filesystem

  • return: True
  • access: protected
bool _setAccessMode ($accessMode $accessMode)
  • $accessMode $accessMode: Access mode: either 'a' append or 'w' overwrite

Documentation generated on Thu, 18 Jan 2007 09:53:27 -0800 by phpDocumentor 1.3.1