The Battle for Wesnoth  1.17.0-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

int64_t ticks_
 
const log_domaindomain_
 
std::string str_
 

Detailed Description

Definition at line 181 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 187 of file log.hpp.

References lg::debug().

◆ scope_logger() [2/2]

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

Definition at line 194 of file log.hpp.

References lg::debug().

◆ ~scope_logger()

lg::scope_logger::~scope_logger ( )
inline

Definition at line 201 of file log.hpp.

References lg::log_to_chat().

Member Function Documentation

◆ do_log_entry()

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

Definition at line 266 of file log.cpp.

References lg::debug(), and indent.

◆ do_log_exit()

void lg::scope_logger::do_log_exit ( )
privatenoexcept

Definition at line 276 of file log.cpp.

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

Member Data Documentation

◆ domain_

const log_domain& lg::scope_logger::domain_
private

Definition at line 184 of file log.hpp.

◆ str_

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

Definition at line 185 of file log.hpp.

◆ ticks_

int64_t lg::scope_logger::ticks_
private

Definition at line 183 of file log.hpp.


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