The Battle for Wesnoth  1.19.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 237 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 243 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 250 of file log.hpp.

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

◆ ~scope_logger()

lg::scope_logger::~scope_logger ( )
inline

Definition at line 257 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 521 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 531 of file log.cpp.

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

Referenced by ~scope_logger().

Member Data Documentation

◆ domain_

const log_domain& lg::scope_logger::domain_
private

Definition at line 240 of file log.hpp.

Referenced by do_log_exit().

◆ str_

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

Definition at line 241 of file log.hpp.

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

◆ ticks_

int64_t lg::scope_logger::ticks_
private

Definition at line 239 of file log.hpp.

Referenced by do_log_exit().


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