DbalLogger
in package
implements
SQLLogger
Tags
Table of Contents
Interfaces
- SQLLogger
- Interface for SQL loggers.
Constants
- BINARY_DATA_VALUE = '(binary value)'
- MAX_STRING_LENGTH = 32
Properties
- $logger : mixed
- $stopwatch : mixed
Methods
- __construct() : mixed
- startQuery() : void
- Logs a SQL statement somewhere.
- stopQuery() : void
- Marks the last started query as stopped. This can be used for timing of queries.
- log() : mixed
- Logs a message.
- normalizeParams() : array<string|int, mixed>
Constants
BINARY_DATA_VALUE
public
mixed
BINARY_DATA_VALUE
= '(binary value)'
MAX_STRING_LENGTH
public
mixed
MAX_STRING_LENGTH
= 32
Properties
$logger
protected
mixed
$logger
$stopwatch
protected
mixed
$stopwatch
Methods
__construct()
public
__construct([LoggerInterface $logger = null ][, Stopwatch $stopwatch = null ]) : mixed
Parameters
- $logger : LoggerInterface = null
- $stopwatch : Stopwatch = null
startQuery()
Logs a SQL statement somewhere.
public
startQuery(mixed $sql[, array<string|int, mixed> $params = null ][, array<string|int, mixed> $types = null ]) : void
Parameters
- $sql : mixed
-
SQL statement
- $params : array<string|int, mixed> = null
-
Statement parameters
- $types : array<string|int, mixed> = null
-
Parameter types
stopQuery()
Marks the last started query as stopped. This can be used for timing of queries.
public
stopQuery() : void
log()
Logs a message.
protected
log(string $message, array<string|int, mixed> $params) : mixed
Parameters
- $message : string
- $params : array<string|int, mixed>
normalizeParams()
private
normalizeParams(array<string|int, mixed> $params) : array<string|int, mixed>
Parameters
- $params : array<string|int, mixed>