From a2e94c9d580d202e5a4ebf1c731a51d187034775 Mon Sep 17 00:00:00 2001 From: Ben Johnson Date: Sat, 23 Jul 2022 08:57:35 -0600 Subject: Add build tag to enable OSTRACE() logging This commit adds the `sqlite_os_trace` build tag which sets the `SQLITE_FORCE_OS_TRACE` and `SQLITE_DEBUG_OS_TRACE` compilation flags. This produces verbose debugging output of every operating system call made by SQLite. --- sqlite3_opt_os_trace.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 sqlite3_opt_os_trace.go (limited to 'sqlite3_opt_os_trace.go') diff --git a/sqlite3_opt_os_trace.go b/sqlite3_opt_os_trace.go new file mode 100644 index 0000000..9a30566 --- /dev/null +++ b/sqlite3_opt_os_trace.go @@ -0,0 +1,15 @@ +// Copyright (C) 2022 Yasuhiro Matsumoto . +// +// Use of this source code is governed by an MIT-style +// license that can be found in the LICENSE file. + +//go:build sqlite_os_trace +// +build sqlite_os_trace + +package sqlite3 + +/* +#cgo CFLAGS: -DSQLITE_FORCE_OS_TRACE=1 +#cgo CFLAGS: -DSQLITE_DEBUG_OS_TRACE=1 +*/ +import "C" -- cgit v1.2.3