LIEF: Library to Instrument Executable Formats Version 0.15.0
Loading...
Searching...
No Matches
logging.hpp
1/* Copyright 2017 - 2024 R. Thomas
2 * Copyright 2017 - 2024 Quarkslab
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16#ifndef LIEF_LOGGING_H
17#define LIEF_LOGGING_H
18
19#include "LIEF/visibility.h"
20#include "LIEF/types.hpp"
21
22#include <string>
23
24namespace spdlog {
25class logger;
26}
27
28namespace LIEF {
29namespace logging {
30
36enum LOGGING_LEVEL {
37 LOG_TRACE,
38 LOG_DEBUG,
39 LOG_INFO,
40 LOG_WARN,
41 LOG_ERR,
42 LOG_CRITICAL,
43};
44
45LIEF_API const char* to_string(LOGGING_LEVEL e);
46
48LIEF_API void disable();
49
51LIEF_API void enable();
52
54LIEF_API void set_level(LOGGING_LEVEL level);
55
57LIEF_API void set_path(const std::string& path);
58
60LIEF_API void log(LOGGING_LEVEL level, const std::string& msg);
61
62LIEF_API void set_logger(const spdlog::logger& logger);
63
64LIEF_API void reset();
65
66}
67}
68
69#endif
LIEF namespace.
Definition Abstract/Binary.hpp:32