ecto_dbg
ecto_dbg copied to clipboard
[question] using without the *_and_log wrappers
Hi!
I couldn't figure out how to use ecto_dbg with Scrivener's paginate/2.
log_query/4 seems like the logical choice, except it gets a bit long winded with the opts (3rd param):
EctoDbg.log_query(
Repo,
:all,
[
level: :debug,
logger_function: {EctoDbg, :default_logger},
only: [:test, :dev]
],
query
)
Repo.paginate(query, opts)
Any guidance/tips would be appreciated. Thanks!
I would also like to use ecto_dbg to log queries made by my library dx, which uses dataloader under the hood, so using the *_and_log wrappers is not feasible.
Would it be possible to add an easy-to-use public API version of log_query/4 mentioned by @glennr?
Ideally, this would be compatible and easy to use with the telemetry events emitted by Ecto.
Thanks for considering and making this great library! ❤️