24 #ifndef __ARM_COMPUTE_LOGGING_LOGGER_H__ 25 #define __ARM_COMPUTE_LOGGING_LOGGER_H__ 58 Logger(std::string name,
LogLevel log_level, std::vector<std::shared_ptr<Printer>> printers = {});
68 std::vector<std::shared_ptr<Printer>> printers,
69 std::vector<std::unique_ptr<IDecorator>> decorators);
71 Logger(Logger &&) =
default;
73 Logger(
const Logger &) =
delete;
75 Logger &
operator=(
const Logger &) =
delete;
83 void log(
LogLevel log_level,
const std::string &msg);
90 template <
typename... Ts>
91 void log(
LogLevel log_level,
const std::string &fmt, Ts &&... args);
108 std::string
name()
const;
115 void add_printer(std::shared_ptr<Printer> printer);
126 void set_default_decorators();
134 bool is_loggable(
LogLevel log_level);
139 void decorate_log_msg(
LogMsg &msg);
147 std::string create_log_msg(
const std::string &str,
LogLevel log_level);
152 void print_all(
const std::string &msg);
157 std::vector<std::shared_ptr<Printer>> _printers;
158 std::vector<std::unique_ptr<IDecorator>> _decorators;
161 template <
typename... Ts>
166 if(!is_loggable(log_level))
void add_decorator(std::unique_ptr< IDecorator > decorator)
Adds a log message decorator to the logger.
std::string string_with_format(const std::string &fmt, Ts &&...args)
Create a string given a format.
Logger & operator=(const Logger &)=delete
Prevent instances of this class from being copied (As this class contains pointers) ...
void log(LogLevel log_level, const std::string &msg)
Logs a message.
This file contains all available output stages for GEMMLowp on OpenCL.
void set_log_level(LogLevel log_level)
Sets log level of the logger.
void add_printer(std::shared_ptr< Printer > printer)
Adds a printer to the logger.
std::string name() const
Returns logger's name.
LogLevel log_level() const
Returns logger's log level.
LogLevel
Logging level enumeration.
Logger(std::string name, LogLevel log_level, std::shared_ptr< Printer > printer)
Default Constructor.