xxtelebot  1.4.1.0
A simple Telegram Bot implementation in C++
Public Member Functions | List of all members
tgbot::Logger Class Reference

Logging facility for telegram-bot-api, see also: tgbot::methods::Api::getLogger() More...

#include <logger.h>

Public Member Functions

 Logger (Logger const &)=default
 copying by constructor allowed, BUT NOT ENCOURAGED!!
 
 Logger (Logger &&)=delete
 
Loggeroperator= (Logger const &)=delete
 
Loggeroperator= (Logger &&)=delete
 
void info (std::string const &logInfo) const
 log some info... More...
 
void error (std::string const &logError) const
 log some error... More...
 
 operator bool () const
 checks for failbit More...
 
void setStream (std::ostream &newStream)
 set new stream More...
 
void setDateFormat (std::string &newDateFormat)
 set new date format, default is: "%Y/%m/%d %H:%M:%S" More...
 

Detailed Description

Logging facility for telegram-bot-api, see also: tgbot::methods::Api::getLogger()

Member Function Documentation

void tgbot::Logger::error ( std::string const &  logError) const

log some error...

Parameters
logErrorerror string
void tgbot::Logger::info ( std::string const &  logInfo) const

log some info...

Parameters
logInfoinfo string
tgbot::Logger::operator bool ( ) const
explicit

checks for failbit

Returns
is failbit enabled on the ostream?
void tgbot::Logger::setDateFormat ( std::string &  newDateFormat)
inline

set new date format, default is: "%Y/%m/%d %H:%M:%S"

Parameters
newDateFormatyour new date format
void tgbot::Logger::setStream ( std::ostream &  newStream)
inline

set new stream

Parameters
newStream: your new stream (might be std::cout, std::cerr, an std::ofstream or whatever...)

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