\Pop\Log\WriterFile

File log writer class

Summary

Methods
Properties
Constants
writeLog()
writeCustomLog()
getContext()
__construct()
No public properties found
No constants found
No protected methods found
$allowed
$fullpath
$basename
$filename
$extension
$size
$mime
N/A
No private methods found
No private properties found
N/A

Properties

$allowed

$allowed : array

Array of allowed log file types

Type

array

$fullpath

$fullpath : string

Full path of log file, i.e. '/path/to/logfile.ext'

Type

string

$basename

$basename : string

Full basename of log file, i.e. 'logfile.ext'

Type

string

$filename

$filename : string

Full filename of log file, i.e. 'logfile'

Type

string

$extension

$extension : string

Log file extension, i.e. 'ext'

Type

string

$size

$size : integer

Log file size in bytes

Type

integer

$mime

$mime : string

Log file mime type

Type

string

Methods

writeLog()

writeLog(mixed  $level, string  $message, array  $context = array()) : \Pop\Log\Writer\File

Write to the log

Parameters

mixed $level
string $message
array $context

Returns

\Pop\Log\Writer\File

writeCustomLog()

writeCustomLog(string  $content) : \Pop\Log\Writer\File

Write to a custom log

Parameters

string $content

Returns

\Pop\Log\Writer\File

getContext()

getContext(array  $context = array()) : string

Get context for log

Parameters

array $context

Returns

string

__construct()

__construct(string  $file, array  $types = null) : \Pop\Log\Writer\File

Constructor

Instantiate the file writer object

Parameters

string $file
array $types

Throws

\Pop\Log\Writer\Exception

Returns

\Pop\Log\Writer\File