\Pop\Log\WriterDb

Db log writer class

Summary

Methods
Properties
Constants
writeLog()
getContext()
__construct()
No public properties found
No constants found
createTable()
$db
$table
N/A
No private methods found
No private properties found
N/A

Properties

$table

$table : string

Table

Type

string

Methods

writeLog()

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

Write to the log

Parameters

mixed $level
string $message
array $context

Returns

\Pop\Log\Writer\Db

getContext()

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

Get context for log

Parameters

array $context

Returns

string

__construct()

__construct(\Pop\Db\Adapter\AbstractAdapter  $db, string  $table = 'pop_log') 

Constructor

Instantiate the DB writer object

The DB table requires the following fields at a minimum: timestamp DATETIME level INT name VARCHAR message TEXT, VARCHAR, etc. context TEXT, VARCHAR, etc.

Parameters

\Pop\Db\Adapter\AbstractAdapter $db
string $table

createTable()

createTable() : void

Create table in databse