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 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
- Name of the writer
- $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 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
- Name of the option
- $value
- Value of the option
- $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
- Name of the option
Returns
mixed Value of the option entry
|
public
|
#
removeOption( string $option )
Removes an option entry.
Parameters
- $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
- Message to write
- $priority
- Priority of the log entry
Returns
boolean State of the write process
|
Properties summary
protected
array
|
$_options
Contains all options of the current writer instance.
Contains all options of the current writer instance.
|
|