From 9390ae98213825f7d23bc3312f9c64bbeb396658 Mon Sep 17 00:00:00 2001 From: Tobie Morgan Hitchcock Date: Thu, 20 Jan 2022 23:06:58 +0000 Subject: [PATCH] Add SQL statement logging --- src/dbs/executor.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/dbs/executor.rs b/src/dbs/executor.rs index 184b665c..4d6c166a 100644 --- a/src/dbs/executor.rs +++ b/src/dbs/executor.rs @@ -10,6 +10,8 @@ use crate::sql::statement::Statement; use crate::sql::value::Value; use std::time::Instant; +const NAME: &'static str = "surreal::exe"; + #[derive(Debug, Default)] pub struct Executor { pub id: Option, @@ -53,6 +55,8 @@ impl Executor { let mut opt = Options::new(&Auth::No); // Process all statements in query for stm in qry.statements().iter() { + // Log the statement + debug!(target: NAME, "{}", stm); // Reset errors if self.txn.is_none() { self.err = None;