launchbadge/sqlx

Log queries including bind arguments and execution time

開放

#162 建立於 2020年3月26日

 (9 則留言) (0 個反應) (0 位負責人)Rust (1,307 個分叉)batch import
enhancementhelp wanted

倉庫指標

星標
 (13,916 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

TRACE sqlx::query > SELECT …, elapsed: 0.04ms

    SELECT foo, bar, baz
    FROM this_table_over_here
    WHERE foo = $1 AND bar = $2
    ORDER BY baz

    $1 = 50
    $2 = 694

TRACE sqlx::query > INSERT INTO table_name …, elapsed: 12.04ms

Log format is very "let's figure out what we think looks best". Use log. We should new line + indent like error stack traces for the query body. Not sure how to nicely show the bind arguments.

貢獻者指南