dolibarr  20.0.0-alpha
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 into the log file. 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 of collected data

Definition at line 96 of file DolLogsCollector.php.

◆ getLevels()

DolLogsCollector::getLevels ( )

Get the log levels from psr/log.

Returns
array Array of log level

Definition at line 223 of file DolLogsCollector.php.

◆ getLogs()

DolLogsCollector::getLogs (   $file)

Search a string for log entries into the log file.

Used when debug bar scan log file (very slow).

Parameters
string$fileFile
Returns
array Lines of logs

Definition at line 198 of file DolLogsCollector.php.

◆ getLogsFile()

DolLogsCollector::getLogsFile ( )

Get the path to the logs file.

Returns
string

Definition at line 128 of file DolLogsCollector.php.

◆ getStorageLogs()

DolLogsCollector::getStorageLogs (   $path)

Get logs.

Parameters
string$pathPath
Returns
void

Definition at line 141 of file DolLogsCollector.php.

◆ getWidgets()

DolLogsCollector::getWidgets ( )

Return widget settings.

Returns
array Array

Definition at line 70 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 162 of file DolLogsCollector.php.


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