SyTen
log.cpp File Reference

Implementation for file inc/util/log.h. More...

#include <unistd.h>
#include "inc/util/log.h"
+ Include dependency graph for log.cpp:

Namespaces

namespace  syten
 Syten namespace.
 
namespace  syten::Log
 Global variables for the logging subsystem.
 

Functions

void syten::Log::initLogsP1 ()
 Sets stdcerr_is_tty. More...
 
void syten::Log::initLogsP2 ()
 Initialises the file streams if timing_log_name and/or generic_log_name are set and the log levels are greater than none. More...
 
void syten::Log::log_output (PrintPrefix pp, StreamIsTTY tty, int level, std::ostream &output_stream, std::string const &str)
 Outputs the supplied string to the supplied file stream. More...
 

Variables

int syten::Log::T::current_file = Log::T::info-100
 current timing data log level for the file stream More...
 
int syten::Log::G::current_file = Log::G::info
 current generic data log level for the file stream More...
 
int syten::Log::T::current_stdcerr = Log::T::info-100
 current timing data log level for std::cerr More...
 
int syten::Log::G::current_stdcerr = Log::G::info
 current generic data log level for std::cerr More...
 
std::ofstream syten::Log::generic_log
 file stream for generic data, if enabled More...
 
std::string syten::Log::generic_log_name
 file name for generic data, if enabled More...
 
bool syten::Log::stdcerr_is_tty
 true if std::cerr is a tty so that we can print colour codes More...
 
std::ofstream syten::Log::timing_log
 file stream for timing data, if enabled More...
 
std::string syten::Log::timing_log_name
 file name for timing data, if enabled More...
 
std::mutex syten::Log::warning_cerr_mtx
 mutex protecting std::cerr when printing to it More...
 

Detailed Description

Implementation for file inc/util/log.h.