aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/sqlite/sqlitetracing.h
blob: 8dadc6de0db45ac3171acb0fd4f14cc1f0bea23c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Copyright (C) 2024 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0

#include "sqliteglobal.h"

#include <nanotrace/nanotracehr.h>

namespace Sqlite {
using namespace NanotraceHR::Literals;

constexpr NanotraceHR::Tracing sqliteTracingStatus()
{
#ifdef ENABLE_SQLITE_TRACING
    return NanotraceHR::Tracing::IsEnabled;
#else
    return NanotraceHR::Tracing::IsDisabled;
#endif
}

using TraceFile = NanotraceHR::TraceFile<sqliteTracingStatus()>;

SQLITE_EXPORT TraceFile &traceFile();

NanotraceHR::StringViewWithStringArgumentsCategory<sqliteTracingStatus()> &sqliteLowLevelCategory();

SQLITE_EXPORT NanotraceHR::StringViewWithStringArgumentsCategory<sqliteTracingStatus()> &
sqliteHighLevelCategory();

} // namespace Sqlite