Log stream buffer with a minimum LogLevel, that redirects the buffered output to a logging function. Used to offer own streams to write to for each log level.  
 More...
#include <log_streambuffer.h>
|  | 
|  | LogStreamBuf (std::shared_ptr< std::function< void(LogLevel, const std::string &)> > logFuncPtr, LogLevel lvl, LogLevel lvlMin) | 
|  | Construct a new LogStreamBuf. 
 | 
|  | 
| int | sync () override | 
|  | 
| void | setMinLevel (LogLevel lvlMin) | 
|  | Set the minimum log level for this buffer. 
 | 
|  | 
Log stream buffer with a minimum LogLevel, that redirects the buffered output to a logging function. Used to offer own streams to write to for each log level. 
- Note
- Does not flush automatically on newline, call sync() or explicitly flush buffer. 
◆ LogStreamBuf()
  
  | 
        
          | cli::logging::LogStreamBuf::LogStreamBuf | ( | std::shared_ptr< std::function< void(LogLevel, const std::string &)> > | logFuncPtr, |  
          |  |  | LogLevel | lvl, |  
          |  |  | LogLevel | lvlMin |  
          |  | ) |  |  |  | inlineexplicit | 
 
Construct a new LogStreamBuf. 
- Parameters
- 
  
    | logFuncPtr | The logging function to call with the buffered output |  | lvl | The log level for this buffer |  | lvlMin | The minimum log level for this buffer |  
 
 
 
◆ setMinLevel()
  
  | 
        
          | void cli::logging::LogStreamBuf::setMinLevel | ( | LogLevel | lvlMin | ) |  |  | inline | 
 
Set the minimum log level for this buffer. 
- Parameters
- 
  
    | lvlMin | The new minimum log level |  
 
 
 
The documentation for this class was generated from the following files: