dolibarr  19.0.0-dev
Public Member Functions | Protected Member Functions | List of all members
DolLogsCollector Class Reference

DolLogsCollector class. More...

Inheritance diagram for DolLogsCollector:
Inheritance graph
[legend]
Collaboration diagram for DolLogsCollector:
Collaboration graph
[legend]

Public Member Functions

 __construct ($path=null, $name='logs')
 Constructor. More...
 
 getWidgets ()
 Return widget settings. More...
 
 collect ()
 Return collected data. More...
 
 getLogsFile ()
 Get the path to the logs file. More...
 
 getStorageLogs ($path)
 Get logs. More...
 
 getLogs ($file)
 Search a string for log entries. More...
 
 getLevels ()
 Get the log levels from psr/log. More...
 

Protected Member Functions

 tailFile ($file, $lines)
 Get latest file lines. More...
 

Detailed Description

DolLogsCollector class.

Definition at line 33 of file DolLogsCollector.php.

Constructor & Destructor Documentation

◆ __construct()

DolLogsCollector::__construct (   $path = null,
  $name = 'logs' 
)

Constructor.

Parameters
string$pathPath
string$nameName

Definition at line 55 of file DolLogsCollector.php.

Member Function Documentation

◆ collect()

DolLogsCollector::collect ( )

Return collected data.

Returns
array Array

Definition at line 98 of file DolLogsCollector.php.

◆ getLevels()

DolLogsCollector::getLevels ( )

Get the log levels from psr/log.

Returns
array Array of log level

Definition at line 224 of file DolLogsCollector.php.

◆ getLogs()

DolLogsCollector::getLogs (   $file)

Search a string for log entries.

Parameters
string$fileFile
Returns
array Lines of logs

Definition at line 200 of file DolLogsCollector.php.

◆ getLogsFile()

DolLogsCollector::getLogsFile ( )

Get the path to the logs file.

Returns
string

Definition at line 130 of file DolLogsCollector.php.

◆ getStorageLogs()

DolLogsCollector::getStorageLogs (   $path)

Get logs.

Parameters
string$pathPath
Returns
void

Definition at line 143 of file DolLogsCollector.php.

◆ getWidgets()

DolLogsCollector::getWidgets ( )

Return widget settings.

Returns
array Array

Definition at line 72 of file DolLogsCollector.php.

◆ tailFile()

DolLogsCollector::tailFile (   $file,
  $lines 
)
protected

Get latest file lines.

Parameters
string$fileFile
int$linesLines
Returns
array Array

Definition at line 164 of file DolLogsCollector.php.


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