yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
log.h File Reference
#include <atomic>
#include <chrono>
#include <fstream>
#include <iostream>
#include <memory>
#include <set>
#include <string>
#include <vector>
#include <utility>
#include "absl/strings/str_format.h"
#include "absl/strings/str_cat.h"
#include "app/core/features.h"
#include "absl/strings/string_view.h"

Go to the source code of this file.

Classes

class  yaze::util::LogManager
 A singleton that manages all logging configuration and output. More...
 

Namespaces

namespace  yaze
 Main namespace for the application.
 
namespace  yaze::util
 

Macros

#define LOG(level, category, format, ...)
 
#define LOG_DEBUG(category, format, ...)    LOG(yaze::util::LogLevel::YAZE_DEBUG, category, format, ##__VA_ARGS__)
 
#define LOG_INFO(category, format, ...)    LOG(yaze::util::LogLevel::INFO, category, format, ##__VA_ARGS__)
 
#define LOG_WARN(category, format, ...)    LOG(yaze::util::LogLevel::WARNING, category, format, ##__VA_ARGS__)
 
#define LOG_ERROR(category, format, ...)    LOG(yaze::util::LogLevel::ERROR, category, format, ##__VA_ARGS__)
 
#define LOG_FATAL(category, format, ...)    LOG(yaze::util::LogLevel::FATAL, category, format, ##__VA_ARGS__)
 

Enumerations

enum class  yaze::util::LogLevel {
  yaze::util::YAZE_DEBUG , yaze::util::INFO , yaze::util::WARNING , yaze::util::ERROR ,
  yaze::util::FATAL
}
 Defines the severity levels for log messages. This allows for filtering messages based on their importance. More...
 

Functions

template<typename... Args>
void yaze::util::logf (const absl::FormatSpec< Args... > &format, Args &&... args)
 
void yaze::util::logf (absl::string_view message)
 

Macro Definition Documentation

◆ LOG

#define LOG (   level,
  category,
  format,
  ... 
)
Value:
do { \
yaze::util::LogManager::instance().log( \
level, category, absl::StrFormat(format, ##__VA_ARGS__)); \
} while (0)

Definition at line 98 of file log.h.

◆ LOG_DEBUG

#define LOG_DEBUG (   category,
  format,
  ... 
)     LOG(yaze::util::LogLevel::YAZE_DEBUG, category, format, ##__VA_ARGS__)

Definition at line 104 of file log.h.

◆ LOG_INFO

#define LOG_INFO (   category,
  format,
  ... 
)     LOG(yaze::util::LogLevel::INFO, category, format, ##__VA_ARGS__)

Definition at line 106 of file log.h.

◆ LOG_WARN

#define LOG_WARN (   category,
  format,
  ... 
)     LOG(yaze::util::LogLevel::WARNING, category, format, ##__VA_ARGS__)

Definition at line 108 of file log.h.

◆ LOG_ERROR

#define LOG_ERROR (   category,
  format,
  ... 
)     LOG(yaze::util::LogLevel::ERROR, category, format, ##__VA_ARGS__)

Definition at line 110 of file log.h.

◆ LOG_FATAL

#define LOG_FATAL (   category,
  format,
  ... 
)     LOG(yaze::util::LogLevel::FATAL, category, format, ##__VA_ARGS__)

Definition at line 112 of file log.h.