diff options
Diffstat (limited to 'bpkg/diagnostics.cxx')
-rw-r--r-- | bpkg/diagnostics.cxx | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/bpkg/diagnostics.cxx b/bpkg/diagnostics.cxx index 697bd28..221bded 100644 --- a/bpkg/diagnostics.cxx +++ b/bpkg/diagnostics.cxx @@ -6,6 +6,8 @@ #include <iostream> +#include <odb/statement.hxx> + #include <bpkg/utility> using namespace std; @@ -98,6 +100,29 @@ namespace bpkg r << name_ << ": "; } + // trace + // + void trace_mark_base:: + prepare (odb::connection&, const odb::statement& s) + { + if (verb >= 6) + static_cast<trace_mark&> (*this) << "PREPARE " << s.text (); + } + + void trace_mark_base:: + execute (odb::connection&, const char* stmt) + { + if (verb >= 5) + static_cast<trace_mark&> (*this) << stmt; + } + + void trace_mark_base:: + deallocate (odb::connection&, const odb::statement& s) + { + if (verb >= 6) + static_cast<trace_mark&> (*this) << "DEALLOCATE " << s.text (); + } + const basic_mark error ("error"); const basic_mark warn ("warning"); const basic_mark info ("info"); |