Orbit Framework 2.0.0
A high-performance asynchronous C++20 HTTP server framework.
Loading...
Searching...
No Matches
Logger.hpp File Reference
#include <orbit/legacy_namespaces.hpp>
#include <string>
#include <iostream>
#include <sstream>
#include <mutex>
#include <functional>
#include <utility>
#include <vector>
Include dependency graph for Logger.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  orbit::utils::Logger
 

Namespaces

namespace  orbit
 
namespace  orbit::utils
 
namespace  orbit::utils::log_levels
 

Macros

#define ORBIT_LOG_AT(level, msg)   do { if (::orbit::utils::Logger::current_level <= (level)) { std::ostringstream orbit_log_stream_; orbit_log_stream_ << msg; ::orbit::utils::Logger::log((level), __FILE__, __LINE__, orbit_log_stream_.str()); } } while(0)
 
#define LOG_DEBUG(msg)   ORBIT_LOG_AT(::orbit::utils::log_levels::kDebug, msg)
 
#define LOG_INFO(msg)   ORBIT_LOG_AT(::orbit::utils::log_levels::kInfo, msg)
 
#define LOG_WARN(msg)   ORBIT_LOG_AT(::orbit::utils::log_levels::kWarn, msg)
 
#define LOG_ERROR(msg)   ORBIT_LOG_AT(::orbit::utils::log_levels::kError, msg)
 

Typedefs

using orbit::utils::LogFields = std::vector< std::pair< std::string, std::string > >
 

Enumerations

enum class  orbit::utils::LogLevel { orbit::utils::DEBUG = 0 , orbit::utils::INFO = 1 , orbit::utils::WARN = 2 , orbit::utils::ERROR = 3 }
 
enum class  orbit::utils::LogFormat { orbit::utils::Text , orbit::utils::Json }
 

Variables

constexpr LogLevel orbit::utils::log_levels::kDebug = LogLevel::DEBUG
 
constexpr LogLevel orbit::utils::log_levels::kInfo = LogLevel::INFO
 
constexpr LogLevel orbit::utils::log_levels::kWarn = LogLevel::WARN
 
constexpr LogLevel orbit::utils::log_levels::kError = LogLevel::ERROR
 

Macro Definition Documentation

◆ LOG_DEBUG

◆ LOG_ERROR

#define LOG_ERROR (   msg)    ORBIT_LOG_AT(::orbit::utils::log_levels::kError, msg)

◆ LOG_INFO

#define LOG_INFO (   msg)    ORBIT_LOG_AT(::orbit::utils::log_levels::kInfo, msg)

◆ LOG_WARN

#define LOG_WARN (   msg)    ORBIT_LOG_AT(::orbit::utils::log_levels::kWarn, msg)

◆ ORBIT_LOG_AT

#define ORBIT_LOG_AT (   level,
  msg 
)    do { if (::orbit::utils::Logger::current_level <= (level)) { std::ostringstream orbit_log_stream_; orbit_log_stream_ << msg; ::orbit::utils::Logger::log((level), __FILE__, __LINE__, orbit_log_stream_.str()); } } while(0)