Ecto.LogEntry
SourceSummary↑
__struct__() | Struct used for logging entries |
resolve(entry) | Resolves a log entry |
to_iodata(entry) | Converts a log entry into iodata |
Types ↑
t :: %Ecto.LogEntry{query: iodata | (t -> iodata), params: [term], query_time: integer, queue_time: integer | nil, result: {:ok, term} | {:error, Exception.t}}
Functions
Struct used for logging entries.
It is composed of the following fields:
- query - the query as iodata or a function that when invoked resolves to iodata;
- params - the query parameters;
- result - the query result as an
:ok
or:error
tuple; - query_time - the time spent executing the query in microseconds;
- queue_time - the time spent to check the connection out in microseconds (it may be nil);
Resolves a log entry.
In case the query is represented by a function for lazy computation, this function resolves it into iodata.
Converts a log entry into iodata.
The entry is automatically resolved if it hasn’t been yet.