helics
3.5.2
|
#include <logger.h>
Public Member Functions | |
LoggerNoThread () | |
LoggerNoThread (const std::shared_ptr< LoggingCore > &core) | |
void | openFile (const std::string &file) |
void | closeFile () |
void | startLogging (int cLevel, int fLevel) |
void | startLogging () |
void | log (int level, const std::string &logMessage) |
void | log (const std::string &logMessage) |
bool | isRunning () const |
void | flush () |
void | changeLevels (int cLevel, int fLevel) |
Public Attributes | |
int | consoleLevel = log_everything |
level below which we need to print to the console | |
int | fileLevel = log_everything |
level below which we need to print to a file | |
logging class that handle the logs immediately with no threading or synchronization
|
default |
default constructor
|
explicit |
this does nothing with the argument since it is not threaded here to match the API of Logger
void helics::LoggerNoThread::changeLevels | ( | int | cLevel, |
int | fLevel | ||
) |
alter the printing levels
cLevel | the level to print to the console |
fLevel | the level to print to the file if it is open |
References consoleLevel, and fileLevel.
void helics::LoggerNoThread::closeFile | ( | ) |
close the file for logging
void helics::LoggerNoThread::flush | ( | ) |
flush the log queue
bool helics::LoggerNoThread::isRunning | ( | ) | const |
check if the logging thread is running
|
inline |
message to log without regard for levels*
logMessage | the message to log |
References helics::always_log, and log().
Referenced by log().
void helics::LoggerNoThread::log | ( | int | level, |
const std::string & | logMessage | ||
) |
log a message at a particular level
level | the level of the message |
logMessage | the actual message to log |
References consoleLevel, and fileLevel.
void helics::LoggerNoThread::openFile | ( | const std::string & | file | ) |
open a file to write the log messages
file | the name of the file to write messages to |
|
inline |
overload of /ref startLogging with unspecified logging levels
References consoleLevel, fileLevel, and startLogging().
Referenced by startLogging().
void helics::LoggerNoThread::startLogging | ( | int | cLevel, |
int | fLevel | ||
) |
function to start the logging thread
cLevel | the console print level |
fLevel | the file print level messages coming in below these levels will be printed |
References consoleLevel, and fileLevel.