The Battle for Wesnoth  1.19.7+dev
Public Member Functions | Private Member Functions | Private Attributes | List of all members
lg::scope_logger Class Reference

#include <log.hpp>

Public Member Functions

 scope_logger (const log_domain &domain, const char *str)
 
 scope_logger (const log_domain &domain, const std::string &str)
 
 ~scope_logger ()
 

Private Member Functions

void do_log_entry (const std::string &str) noexcept
 
void do_log_exit () noexcept
 

Private Attributes

std::chrono::steady_clock::time_point start_
 
const log_domaindomain_
 
std::string str_
 

Detailed Description

Definition at line 239 of file log.hpp.

Constructor & Destructor Documentation

◆ scope_logger() [1/2]

lg::scope_logger::scope_logger ( const log_domain domain,
const char *  str 
)
inline

Definition at line 245 of file log.hpp.

References lg::debug(), and do_log_entry().

◆ scope_logger() [2/2]

lg::scope_logger::scope_logger ( const log_domain domain,
const std::string &  str 
)
inline

Definition at line 252 of file log.hpp.

References lg::debug(), and do_log_entry().

◆ ~scope_logger()

lg::scope_logger::~scope_logger ( )
inline

Definition at line 259 of file log.hpp.

References do_log_exit(), and str_.

Member Function Documentation

◆ do_log_entry()

void lg::scope_logger::do_log_entry ( const std::string &  str)
privatenoexcept

Definition at line 501 of file log.cpp.

References lg::debug(), and indent.

Referenced by scope_logger().

◆ do_log_exit()

void lg::scope_logger::do_log_exit ( )
privatenoexcept

Definition at line 509 of file log.cpp.

References lg::debug(), domain_, indent, output(), start_, str_, and timestamp.

Referenced by ~scope_logger().

Member Data Documentation

◆ domain_

const log_domain& lg::scope_logger::domain_
private

Definition at line 242 of file log.hpp.

Referenced by do_log_exit().

◆ start_

std::chrono::steady_clock::time_point lg::scope_logger::start_
private

Definition at line 241 of file log.hpp.

Referenced by do_log_exit().

◆ str_

std::string lg::scope_logger::str_
private

Definition at line 243 of file log.hpp.

Referenced by do_log_exit(), and ~scope_logger().


The documentation for this class was generated from the following files: