P4C
The P4 Compiler
Loading...
Searching...
No Matches
p4tools/modules/testgen/lib/logging.h
1/*
2 * SPDX-FileCopyrightText: 2022 The P4 Language Consortium
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef BACKENDS_P4TOOLS_MODULES_TESTGEN_LIB_LOGGING_H_
8#define BACKENDS_P4TOOLS_MODULES_TESTGEN_LIB_LOGGING_H_
9
10#include <string>
11#include <utility>
12
13#include "backends/p4tools/common/lib/logging.h" // IWYU pragma: export
14#include "backends/p4tools/common/lib/util.h"
15
16namespace P4::P4Tools::P4Testgen {
17
20template <typename... Arguments>
21void printTraces(const std::string &fmt, Arguments &&...args) {
22 printFeature("test_traces", 4, fmt, std::forward<Arguments>(args)...);
23}
24
26void enableTraceLogging();
27
29void enableStepLogging();
30
32void enableCoverageLogging();
33
34} // namespace P4::P4Tools::P4Testgen
35
36#endif /* BACKENDS_P4TOOLS_MODULES_TESTGEN_LIB_LOGGING_H_ */
void printFeature(const std::string &label, int level, const std::string &fmt, Arguments &&...args)
Definition p4tools/common/lib/logging.h:34