Documentation

Logging
in package

Logging class for PHP scripts Stores log file for a process in "<basePath>/processName/YYYY-MM-DD.log" if prefixDir is not set, try to store in "./".

if the procedure is unable to create "<basePath>/processName" directory, fallback to /dev/stderr

Table of Contents

Constants

fallbackFilePath  = '/dev/stderr'

Properties

$filename  : string
$filepath  : string
$path  : string

Methods

__construct()  : mixed
filename()  : string
Filename of current log file
filepath()  : string
Full filepath of current log file
path()  : string
Path of current log dir
mkPath()  : bool
Create path dir for log files Check if file exists AND is directory AND is writable, or try to create/set it permission

Constants

fallbackFilePath

public mixed fallbackFilePath = '/dev/stderr'

Properties

Methods

__construct()

public __construct([string $processName = 'process/' ][, string $basePath = './' ]) : mixed
Parameters
$processName : string = 'process/'
$basePath : string = './'

filename()

Filename of current log file

public filename() : string
Return values
string

Filename of current log file

filepath()

Full filepath of current log file

public filepath() : string
Return values
string

Full filepath of current log file

path()

Path of current log dir

public path() : string
Return values
string

Path of current log dir

mkPath()

Create path dir for log files Check if file exists AND is directory AND is writable, or try to create/set it permission

private mkPath(string $path) : bool
Parameters
$path : string

Lock path to try to create

Return values
bool

True if file exists AND is directory AND is writable, false otherwise


        
On this page

Search results