|
Previous Class |
Solar_Log_Adapter_Multi |
Next Page |
Solar_Log_Adapter_Multi
Log adapter to save one event in multiple logs.
<?php
// config for a multiple log
$config = array(
'adapter' => 'Solar_Log_Adapter_Multi', // could also be a dependency object?
'adapters' => array(
array(
'adapter' => 'Solar_Log_Adapter_File',
'events' => '*',
'format' => null,
'file' => '/path/to/file.log',
),
array(
'adapter' => 'Solar_Log_Adapter_Echo',
'events' => 'debug',
'format' => null,
),
array(
'adapter' => 'Solar_Log_Adapter_Sql',
'events' => 'warning, severe, critical',
'sql' => 'sql',
'table' => 'table_name',
'%t' => 'ts',
'%e' => 'evt',
'%m' => 'msg',
),
),
);
$log = Solar::factory('Solar_Log', $config);
?>
Catalog
This class is part of the Solar_Log package.
Inheritance:
- Solar_Base
- Solar_Log_Adapter
- Solar_Log_Adapter_Multi
- Solar_Log_Adapter
Constants
None.
Public Properties
The Solar_Log_Adapter_Multi class has no public properties; try the list of all properties.
Public Methods
These are all the public methods in the Solar_Log_Adapter_Multi class.
You can also view the list of all public, protected, and private methods.
__construct()- Constructor.
__destruct()- Default destructor; does nothing other than provide a safe fallback for calls to parent::__destruct().
apiVersion()- Reports the API version for this class.
dump()- Convenience method for getting a dump the whole object, or one of its properties, or an external variable.
getEvents()- Gets the list of events this adapter recognizes.
locale()- Looks up class-specific locale strings based on a key.
save()- Saves (writes) an event and message to the log.
setEvents()- Sets the list of events this adapter recognizes.