Ecto.LogEntry

Source

Summary

__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, connection_pid: pid | nil, result: {:ok, term} | {:error, Exception.t}}

Functions

__struct__()

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);
  • connection_pid - the connection process that executed the query
Source
resolve(entry)

Resolves a log entry.

In case the query is represented by a function for lazy computation, this function resolves it into iodata.

Source
to_iodata(entry)

Converts a log entry into iodata.

The entry is automatically resolved if it hasn’t been yet.

Source