HILA
Loading...
Searching...
No Matches
logger_class Class Reference

Define the logger class here. More...

#include <logger.h>

Public Member Functions

void decrease_level ()
 
void increase_level ()
 
template<typename T >
void log (T text)
 Log function.
 
 logger_class ()
 Constructor without parameters, set the logger to std::out.
 
 logger_class (std::ostream stream)
 Construct with stream.
 
 logger_class (std::string filename)
 Construct with filename.
 
void set_output (std::ostream stream)
 Set the output stream.
 
void set_output (std::string filename)
 Open stream to a file. Interprets strings as filenames.
 
void set_verbosity (int level)
 Set logging level.
 
 ~logger_class ()
 Close the file in the destructor.
 

Friends

template<typename T >
logger_classoperator<< (logger_class &logger, T rhs)
 

Detailed Description

Define the logger class here.

Definition at line 8 of file logger.h.

Member Function Documentation

◆ decrease_level()

void logger_class::decrease_level ( )
inline

Decrease logging level. Should be called when exiting a specialized area of code.

Definition at line 44 of file logger.h.

◆ increase_level()

void logger_class::increase_level ( )
inline

Increase logging level. Should be called when entering a specialized area of code.

Definition at line 40 of file logger.h.

Friends And Related Symbol Documentation

◆ operator<<

template<typename T >
logger_class & operator<< ( logger_class logger,
rhs 
)
friend

Streaming operator for the logger class. Only node 0 prints. This should also accept formatting correctly.

Definition at line 77 of file logger.h.


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