openmediavault  4.0 (Arrakis)
The open network attached storage solution
Public Member Functions | Static Public Member Functions | List of all members
OMV\System\LogFileSpec Class Reference

Public Member Functions

 __construct ($id)
 
 getFileName ()
 
 getFilePath ()
 
 getCommand ()
 
 getRegex ()
 
 getColumns ()
 

Static Public Member Functions

static registerSpecification ($id, array $spec)
 
static assertIsRegistered ($id)
 

Detailed Description

This class that handles the log file specification.

Constructor & Destructor Documentation

◆ __construct()

OMV\System\LogFileSpec::__construct (   $id)

Constructor

Parameters
idThe identifier of the log file specification.

Member Function Documentation

◆ assertIsRegistered()

static OMV\System\LogFileSpec::assertIsRegistered (   $id)
static

Checks if a log file specification is registered.

Parameters
idThe identifier of the log file specification.
Returns
None.
Exceptions

◆ getColumns()

OMV\System\LogFileSpec::getColumns ( )

Get the column configuration.

Returns
The column configuration. Defaults to an empty array.

◆ getCommand()

OMV\System\LogFileSpec::getCommand ( )

Get the command line to be executed to get the log file content.

Returns
The command line, otherwise NULL.

◆ getFileName()

OMV\System\LogFileSpec::getFileName ( )

Get the file name of the log file, e.g. 'syslog'.

Returns
The file name of the log file, otherwise FALSE.

◆ getFilePath()

OMV\System\LogFileSpec::getFilePath ( )

Get the file path of the log file, e.g. '/var/log/syslog'.

Returns
The file path of the log file, otherwise NULL.

◆ getRegex()

OMV\System\LogFileSpec::getRegex ( )

Get the regular expression used to parse a log file line.

Returns
The regular expression. Defaults to an empty string.

◆ registerSpecification()

static OMV\System\LogFileSpec::registerSpecification (   $id,
array  $spec 
)
static

Register a new log file specification.

Parameters
idThe identifier of the log file specification, e.g. 'syslog' or 'auth'.
specThe log file specification.
Returns
None

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