DatabaseLogger typedef
DatabaseLogger =
void Function(DatabaseLogLevel level, String message)
Receives log messages. Messages hold database paths, the shape of a query (its index name,
such as the child path of orderByChild, which bounds are set, its limit), the host the
client connects to, numbers (request numbers, write ids, socket close codes, cache sizes,
timeouts), the type of a client-side error, a fixed reason, and the texts the server sent
(status reasons, shutdown reasons, security debug output), also inside a database error.
The client never logs values it holds or sends: no token, no value read or written, no query bound. A message from the server is logged as the server sent it (control characters escaped, cut at 1 KiB) and, with rules debug output on (emulator), may quote data.
Implementation
typedef DatabaseLogger = void Function(DatabaseLogLevel level, String message);