Ecto.LogEntry

Ecto.LogEntry

Struct used for logging entries.

It is composed of the following fields:

  • query - the query as string or a function that when invoked resolves to string;
  • source - the query data source;
  • params - the query parameters;
  • result - the query result as an :ok or :error tuple;
  • query_time - the time spent executing the query in native units;
  • decode_time - the time spent decoding the result in native units (it may be nil);
  • queue_time - the time spent to check the connection out in native units (it may be nil);
  • connection_pid - the connection process that executed the query;
  • ansi_color - the color that should be used when logging the entry.

Notice all times are stored in native unit. You must convert them to the proper unit by using 登录查看完整内容