dolibarr 21.0.0-alpha
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 109 of file logHandler.php.

◆ configure()

LogHandler::configure ( )

Configuration variables of the module.

Returns
array<array{name:string,constant:string,default:string,css?:string}> Return array of configuration data

Reimplemented in mod_syslog_file, and mod_syslog_syslog.

Definition at line 97 of file logHandler.php.

◆ export()

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

Export the message.

Parameters
array{level:int,ip:string,ospid:string,osuser:string,message:string}$content Array 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 132 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 57 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 47 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 77 of file logHandler.php.

◆ getWarning()

LogHandler::getWarning ( )

Return warning if something is wrong with logger.

Returns
string

Definition at line 67 of file logHandler.php.

◆ isActive()

LogHandler::isActive ( )

Is the logger active ?

Returns
int<0,1> 1 if logger enabled

Reimplemented in mod_syslog_file, and mod_syslog_syslog.

Definition at line 87 of file logHandler.php.

◆ setIdent()

LogHandler::setIdent ( $ident)

Set current ident.

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

Definition at line 120 of file logHandler.php.


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