class DbApiLogger (View source)

Methods

__construct($db)

No description

void
doLog($msg, $priority)

No description

void
pruneOlderThan(int $days)

Delete API log rows older than the given number of days. The cutoff is computed in PHP (UTC) so the comparison is portable across MySQL/PostgreSQL/SQLite; created_at is written by the DB in UTC (SQLite always, and the common UTC-configured MySQL/PostgreSQL deployment).

array
getDistinctEventTypes()

No description

array
getDistinctUsers()

No description

int
countFilteredLogs(array $filters)

No description

array
getFilteredLogs(array $filters, int $limit, int $offset)

No description

Details

__construct($db)

No description

Parameters

$db

void doLog($msg, $priority)

No description

Parameters

$msg
$priority

Return Value

void

void pruneOlderThan(int $days)

Delete API log rows older than the given number of days. The cutoff is computed in PHP (UTC) so the comparison is portable across MySQL/PostgreSQL/SQLite; created_at is written by the DB in UTC (SQLite always, and the common UTC-configured MySQL/PostgreSQL deployment).

Parameters

int $days

Return Value

void

array getDistinctEventTypes()

No description

Return Value

array

array getDistinctUsers()

No description

Return Value

array

int countFilteredLogs(array $filters)

No description

Parameters

array $filters

Return Value

int

array getFilteredLogs(array $filters, int $limit, int $offset)

No description

Parameters

array $filters
int $limit
int $offset

Return Value

array