dolibarr 20.0.0
LogHandler Class Reference

Parent class for log handlers. More...

Inheritance diagram for LogHandler:

Public Member Functions

 getName ()
 Return name of logger.
 
 getInfo ()
 Content of the info tooltip.
 
 getWarning ()
 Return warning if something is wrong with logger.
 
 getVersion ()
 Version of the module ('x.y.z' or 'dolibarr' or 'experimental' or 'development')
 
 isActive ()
 Is the logger active ?
 
 configure ()
 Configuration variables of the module.
 
 checkConfiguration ()
 Function that checks if the configuration is valid.
 
 setIdent ($ident)
 Set current ident.
 
 export ($content, $suffixinfilename='')
 Export the message.
 

Detailed Description

Parent class for log handlers.

Definition at line 24 of file logHandler.php.

Member Function Documentation

◆ checkConfiguration()

LogHandler::checkConfiguration ( )

Function that checks if the configuration is valid.

It will be called after setting the configuration. The function returns an array with error messages

Returns
bool

Reimplemented in mod_syslog_file, and mod_syslog_syslog.

Definition at line 106 of file logHandler.php.

◆ configure()

LogHandler::configure ( )

Configuration variables of the module.

Returns
array

Reimplemented in mod_syslog_file, and mod_syslog_syslog.

Definition at line 94 of file logHandler.php.

◆ export()

LogHandler::export ( $content,
$suffixinfilename = '' )

Export the message.

Parameters
array$contentArray containing the info about the message
string$suffixinfilenameWhen output is a file, append this suffix into default log filename.
Returns
void

Reimplemented in mod_syslog_file, and mod_syslog_syslog.

Definition at line 129 of file logHandler.php.

◆ getInfo()

LogHandler::getInfo ( )

Content of the info tooltip.

Returns
string

Reimplemented in mod_syslog_file, and mod_syslog_syslog.

Definition at line 54 of file logHandler.php.

◆ getName()

LogHandler::getName ( )

Return name of logger.

Returns
string

Reimplemented in mod_syslog_file, and mod_syslog_syslog.

Definition at line 44 of file logHandler.php.

◆ getVersion()

LogHandler::getVersion ( )

Version of the module ('x.y.z' or 'dolibarr' or 'experimental' or 'development')

Returns
string

Reimplemented in mod_syslog_file, and mod_syslog_syslog.

Definition at line 74 of file logHandler.php.

◆ getWarning()

LogHandler::getWarning ( )

Return warning if something is wrong with logger.

Returns
string

Definition at line 64 of file logHandler.php.

◆ isActive()

LogHandler::isActive ( )

Is the logger active ?

Returns
int 1 if logger enabled

Reimplemented in mod_syslog_file, and mod_syslog_syslog.

Definition at line 84 of file logHandler.php.

◆ setIdent()

LogHandler::setIdent ( $ident)

Set current ident.

Parameters
int$ident1=Increase ident of 1, -1=Decrease ident of 1
Returns
void

Definition at line 117 of file logHandler.php.


The documentation for this class was generated from the following file: