A library for working with phylogenetic and population genetic data.
v0.32.0
ResourceLogger Class Reference

#include <genesis/utils/core/resource_logger.hpp>

Detailed Description

Definition at line 61 of file resource_logger.hpp.

Public Member Functions

 ResourceLogger (ResourceLogger &&)=delete
 
 ResourceLogger (ResourceLogger const &)=delete
 
 ResourceLogger (std::chrono::duration< int > interval)
 
 ResourceLogger (std::chrono::duration< int > interval, std::string const &log_file)
 
 ~ResourceLogger ()
 
void log_to_file (std::string const &log_file, bool write_header=true)
 
void log_to_sink (OutputSink sink, bool write_header=true)
 
void log_to_stderr (bool write_header=false)
 
void log_to_stdout (bool write_header=false)
 
ResourceLoggeroperator= (ResourceLogger &&)=delete
 
ResourceLoggeroperator= (ResourceLogger const &)=delete
 
void set_interval (std::chrono::duration< int > new_interval)
 
void start ()
 
void stop ()
 

Public Types

using OutputSink = std::function< void(const std::string &)>
 

Constructor & Destructor Documentation

◆ ResourceLogger() [1/4]

ResourceLogger ( std::chrono::duration< int >  interval)
inline

Definition at line 71 of file resource_logger.hpp.

◆ ResourceLogger() [2/4]

ResourceLogger ( std::chrono::duration< int >  interval,
std::string const &  log_file 
)
inline

Definition at line 76 of file resource_logger.hpp.

◆ ~ResourceLogger()

~ResourceLogger ( )
inline

Definition at line 83 of file resource_logger.hpp.

◆ ResourceLogger() [3/4]

ResourceLogger ( ResourceLogger const &  )
delete

◆ ResourceLogger() [4/4]

ResourceLogger ( ResourceLogger &&  )
delete

Member Function Documentation

◆ log_to_file()

void log_to_file ( std::string const &  log_file,
bool  write_header = true 
)
inline

Definition at line 143 of file resource_logger.hpp.

◆ log_to_sink()

void log_to_sink ( OutputSink  sink,
bool  write_header = true 
)
inline

Definition at line 133 of file resource_logger.hpp.

◆ log_to_stderr()

void log_to_stderr ( bool  write_header = false)
inline

Definition at line 165 of file resource_logger.hpp.

◆ log_to_stdout()

void log_to_stdout ( bool  write_header = false)
inline

Definition at line 155 of file resource_logger.hpp.

◆ operator=() [1/2]

ResourceLogger& operator= ( ResourceLogger &&  )
delete

◆ operator=() [2/2]

ResourceLogger& operator= ( ResourceLogger const &  )
delete

◆ set_interval()

void set_interval ( std::chrono::duration< int >  new_interval)
inline

Definition at line 124 of file resource_logger.hpp.

◆ start()

void start ( )
inline

Definition at line 98 of file resource_logger.hpp.

◆ stop()

void stop ( )
inline

Definition at line 109 of file resource_logger.hpp.

Member Typedef Documentation

◆ OutputSink

using OutputSink = std::function<void(const std::string&)>

Definition at line 65 of file resource_logger.hpp.


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