Class SyslogLog
Syslog stream for Logging. Writes logs to the system logger
- BaseLog implements CakeLogInterface
-
SyslogLog
Copyright: Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
License: MIT License
Located at Cake/Log/Engine/SyslogLog.php
Method Detail
__constructsource public
__construct( array $config array() )
Make sure the configuration contains the format parameter, by default it uses the error number and the type as a prefix to the message
Parameters
- array
$configoptional array() - Options list.
Overrides
BaseLog::__construct() _opensource protected
_open( string $ident , integer $options , integer $facility )
Extracts the call to openlog() in order to run unit tests on it. This function will initialize the connection to the system logger
Parameters
- string
$ident - the prefix to add to all messages logged
- integer
$options - the options flags to be used for logged messages
- integer
$facility - the stream or facility to log to
_writesource protected
_write( integer $priority , string $message )
Extracts the call to syslog() in order to run unit tests on it. This function will perform the actual write in the system logger
Parameters
- integer
$priority - Message priority.
- string
$message - Message to log.
Returns
booleanbool
writesource public
write( string $type , string $message )
Writes a message to syslog
Map the $type back to a LOG_ constant value, split multi-line messages into multiple log messages, pass all messages through the format defined in the configuration
Parameters
- string
$type - The type of log you are making.
- string
$message - The message you want to log.
Returns
booleansuccess of write.
Methods inherited from BaseLog
configsource public
config( array $config array() )
Sets instance config. When $config is null, returns config array
Config
-
typesstring or array, levels the engine is interested in -
scopesstring or array, scopes the engine is interested in
Parameters
- array
$configoptional array() - engine configuration
Returns
arrayarray
Properties summary
Properties inherited from BaseLog
© 2005–2016 The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
http://api.cakephp.org/2.7/class-SyslogLog.html