Go to the documentation of this file.
32enum class LEVEL : uint32_t {
70 const std::vector<std::string>& args);
72template <
typename... Args>
73void log(
LEVEL level,
const std::string& fmt,
const Args &... args) {
74 std::vector<std::string> vec_args;
75 vec_args.insert(vec_args.end(), { static_cast<decltype(vec_args)::value_type>(args)...});
76 return log(level, fmt, vec_args);
87inline void debug(
const std::string& msg) {
91inline void debug(
const std::string& fmt,
const std::vector<std::string>& args) {
95template <
typename... Args>
96void debug(
const std::string& fmt,
const Args &... args) {
97 std::vector<std::string> vec_args;
98 vec_args.insert(vec_args.end(), { static_cast<decltype(vec_args)::value_type>(args)...});
99 return debug(fmt, vec_args);
104inline void info(
const std::string& msg) {
108inline void info(
const std::string& fmt,
const std::vector<std::string>& args) {
112template <
typename... Args>
113void info(
const std::string& fmt,
const Args &... args) {
114 std::vector<std::string> vec_args;
115 vec_args.insert(vec_args.end(), { static_cast<decltype(vec_args)::value_type>(args)...});
116 return info(fmt, vec_args);
121inline void warn(
const std::string& msg) {
125inline void warn(
const std::string& fmt,
const std::vector<std::string>& args) {
129template <
typename... Args>
130void warn(
const std::string& fmt,
const Args &... args) {
131 std::vector<std::string> vec_args;
132 vec_args.insert(vec_args.end(), { static_cast<decltype(vec_args)::value_type>(args)...});
133 return warn(fmt, vec_args);
138inline void err(
const std::string& msg) {
142inline void err(
const std::string& fmt,
const std::vector<std::string>& args) {
146template <
typename... Args>
147void err(
const std::string& fmt,
const Args &... args) {
148 std::vector<std::string> vec_args;
149 vec_args.insert(vec_args.end(), { static_cast<decltype(vec_args)::value_type>(args)...});
150 return err(fmt, vec_args);
159inline void critical(
const std::string& fmt,
const std::vector<std::string>& args) {
163template <
typename... Args>
164void critical(
const std::string& fmt,
const Args &... args) {
165 std::vector<std::string> vec_args;
166 vec_args.insert(vec_args.end(), { static_cast<decltype(vec_args)::value_type>(args)...});
Definition logging.hpp:173
Scoped(const Scoped &)=delete
Scoped & operator=(Scoped &&)=delete
Scoped(LEVEL level)
Definition logging.hpp:181
~Scoped()
Definition logging.hpp:192
const Scoped & set_level(LEVEL lvl) const
Definition logging.hpp:187
Scoped & operator=(const Scoped &)=delete
Definition logging.hpp:31
LEVEL get_level()
Current log level.
LEVEL
Hierarchical logging level
Definition logging.hpp:38
@ TRACE
Definition logging.hpp:41
@ WARN
Definition logging.hpp:44
@ INFO
Definition logging.hpp:43
@ OFF
Definition logging.hpp:39
@ CRITICAL
Definition logging.hpp:46
@ ERR
Definition logging.hpp:45
@ DEBUG
Definition logging.hpp:42
void warn(const std::string &msg)
Definition logging.hpp:121
void set_path(const std::string &path)
Change the logger as a file-base logging and set its path.
void critical(const std::string &msg)
Definition logging.hpp:155
void err(const std::string &msg)
Definition logging.hpp:138
void enable()
Globally enable the logging module.
void set_logger(std::shared_ptr< spdlog::logger > logger)
void disable()
Globally disable the logging module.
void info(const std::string &msg)
Definition logging.hpp:104
void log(LEVEL level, const std::string &msg)
Log a message with the LIEF's logger.
void set_level(LEVEL level)
Change the logging level (hierarchical)
const char * to_string(LEVEL e)
void debug(const std::string &msg)
Definition logging.hpp:87
void enable_debug()
Definition logging.hpp:83
LIEF namespace.
Definition Abstract/Binary.hpp:36
Definition logging.hpp:26
#define LIEF_API
Definition visibility.h:41