2
0
forked from Wavyzz/dolibarr

Created a modular syslog handler system

I've split all log handlers into classes so that people can make
new log handler systems without making changes to the core.
Also, now every log handler can handle how and what will be logged.
This commit is contained in:
Marcos García
2012-10-16 02:01:37 +02:00
parent 5dff8dbc6d
commit 07dcb07fd2
8 changed files with 754 additions and 246 deletions

View File

@@ -0,0 +1,57 @@
<?php
require_once DOL_DOCUMENT_ROOT.'/core/modules/syslog/logHandlerInterface.php';
class LogHandler
{
const STABLE = 'stable';
const DEVELOPMENT = 'development';
const EXPERIMENTAL = 'experimental';
/**
* Content of the info tooltip.
* @return false|string
*/
public function getInfo()
{
return false;
}
/**
* Version of the module
* @return string
*/
public function getVersion()
{
return self::EXPERIMENTAL;
}
/**
* ¿Is the module active?
* @return boolean
*/
public function isActive()
{
return false;
}
/**
* Configuration variables of the module
* @return array
*/
public function configure()
{
return array();
}
/**
* Function that checks if the configuration is valid.
* It will be called after setting the configuration.
* The function returns an array with error messages
* @return array
*/
public function checkConfiguration()
{
return array();
}
}