P4C
The P4 Compiler
 
Loading...
Searching...
No Matches
logging.h
1#ifndef BACKENDS_P4TOOLS_COMMON_LIB_LOGGING_H_
2#define BACKENDS_P4TOOLS_COMMON_LIB_LOGGING_H_
3
4#include <filesystem>
5#include <string>
6#include <utility>
7
8#include "backends/p4tools/common/lib/util.h"
9
10namespace P4Tools {
11
14template <typename... Arguments>
15void printInfo(const std::string &fmt, Arguments &&...args) {
16 printFeature("test_info", 4, fmt, std::forward<Arguments>(args)...);
17}
18
21
24
27void printPerformanceReport(const std::optional<std::filesystem::path> &basePath = std::nullopt);
28
29} // namespace P4Tools
30
31#endif /* BACKENDS_P4TOOLS_COMMON_LIB_LOGGING_H_ */
Definition compiler_target.cpp:19
void printPerformanceReport(const std::optional< std::filesystem::path > &basePath)
Definition logging.cpp:15
void printFeature(const std::string &label, int level, const std::string &fmt, Arguments &&...args)
Definition util.h:36
void printInfo(const std::string &fmt, Arguments &&...args)
Definition logging.h:15
void enablePerformanceLogging()
Enable printing of timing reports.
Definition logging.cpp:13
void enableInformationLogging()
Enable the printing of basic run information.
Definition logging.cpp:11