dolibarr  20.0.0-alpha
Public Member Functions | List of all members
LogHandler Class Reference

Parent class for log handlers. More...

Inheritance diagram for LogHandler:
Inheritance graph
[legend]

Public Member Functions

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

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_syslog, and mod_syslog_file.

Definition at line 106 of file logHandler.php.

◆ configure()

LogHandler::configure ( )

Configuration variables of the module.

Returns
array

Reimplemented in mod_syslog_syslog, and mod_syslog_file.

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_syslog, and mod_syslog_file.

Definition at line 129 of file logHandler.php.

◆ getInfo()

LogHandler::getInfo ( )

Content of the info tooltip.

Returns
string

Reimplemented in mod_syslog_syslog, and mod_syslog_file.

Definition at line 54 of file logHandler.php.

◆ getName()

LogHandler::getName ( )

Return name of logger.

Returns
string

Reimplemented in mod_syslog_syslog, and mod_syslog_file.

Definition at line 44 of file logHandler.php.

References code.

◆ getVersion()

LogHandler::getVersion ( )

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

Returns
string

Reimplemented in mod_syslog_syslog, and mod_syslog_file.

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_syslog, and mod_syslog_file.

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: