abstract class LogHandler (View source)

Parent class for log handlers

Properties

string $code
protected int $ident
string[] $errors

Methods

string
getName()

Return name of logger

string
getInfo()

Content of the info tooltip.

string
getWarning()

Return warning if something is wrong with logger

string
getVersion()

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

int<0, 1>
isActive()

Is the logger active ?

configure()

Configuration variables of the module

bool
checkConfiguration()

Function that checks if the configuration is valid.

void
setIdent(int<-1, 1> $ident)

Set current ident.

void
export(array{level: int, ip: string, ospid: string, osuser: string, message: string} $content, string $suffixinfilename = '')

Export the message

Details

string getName()

Return name of logger

Return Value

string

string getInfo()

Content of the info tooltip.

Return Value

string

string getWarning()

Return warning if something is wrong with logger

Return Value

string

string getVersion()

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

Return Value

string

int<0, 1> isActive()

Is the logger active ?

Return Value

int<0, 1>

1 if logger enabled

configure()

Configuration variables of the module

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

bool 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

Return Value

bool

void setIdent(int<-1, 1> $ident)

Set current ident.

Parameters

int<-1, 1> $ident

1=Increase ident of 1, -1=Decrease ident of 1

Return Value

void

void export(array{level: int, ip: string, ospid: string, osuser: string, message: string} $content, string $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 $suffixinfilename

When output is a file, append this suffix into default log filename.

Return Value

void