Class cLogWriter
This class contains the main functionalities for the logging writer in
CONTENIDO.
Methods summary
public
|
#
__construct( array $options = array() )
Constructor of the writer instance.
Constructor of the writer instance.
Parameters
- $options
array $options Array with options for the writer instance (optional)
|
public static
cLogWriter
|
#
factory( string $writerName, array $writerOptions )
Factory method for a new writer instance.
Factory method for a new writer instance.
Parameters
- $writerName
string $writerName Name of the writer
- $writerOptions
array $writerOptions Options array for the writer instance
Returns
Throws
|
public
|
#
setOptions( array $options )
Sets the whole options array.
Sets the whole options array.
Parameters
- $options
array $options Array with options
|
public
array
|
#
getOptions( )
Returns an array with all options.
Returns an array with all options.
Returns
array Array with all options
|
public
|
#
setOption( string $option, mixed $value, boolean $force = false )
Sets a option. If option was set previously, it must be forced to overwrite
the value.
Sets a option. If option was set previously, it must be forced to overwrite
the value.
Parameters
- $option
string $option Name of the option
- $value
mixed $value Value of the option
- $force
boolean $force Flag to force setting the option value (optional, default: false)
|
public
mixed
|
#
getOption( string $option )
Returns the value of an option entry.
Returns the value of an option entry.
Parameters
- $option
string $option Name of the option
Returns
mixed Value of the option entry
|
public
|
#
removeOption( string $option )
Removes an option entry.
Parameters
- $option
string $option Name of the option
|
abstract public
boolean
|
#
write( string $message, integer $priority )
Abstract function for the write process. This method must be implemented in
the specific writer.
Abstract function for the write process. This method must be implemented in
the specific writer.
Parameters
- $message
string $message Message to write
- $priority
integer $priority Priority of the log entry
Returns
boolean State of the write process
|
Properties summary
protected
array
|
$_options
|
array() |
#
Contains all options of the current writer instance.
Contains all options of the current writer instance.
|