MySQL  8.0.12
Source Code Documentation
ib::info Class Reference

The class info is used to emit informational log messages. More...

#include <ut0ut.h>

Inheritance diagram for ib::info:
ib::logger

Public Member Functions

 info ()
 Default constructor uses ER_IB_MSG_0. More...
 
template<class... Args>
 info (int err, Args &&... args)
 Constructor. More...
 
- Public Member Functions inherited from ib::logger
virtual ~logger ()
 Destructor. More...
 
template<class... Args>
loggerlog (int err, Args &&... args)
 Format an error message. More...
 
template<typename T >
loggeroperator<< (const T &rhs)
 
std::ostream & write (const char *buf, std::streamsize count)
 Write the given buffer to the internal string stream object. More...
 
std::ostream & write (const byte *buf, std::streamsize count)
 Write the given buffer to the internal string stream object. More...
 

Additional Inherited Members

- Public Attributes inherited from ib::logger
std::ostringstream m_oss
 For converting the message into a string. More...
 
int m_err {}
 Error code in errmsg-*.txt. More...
 
loglevel m_level {INFORMATION_LEVEL}
 Error logging level. More...
 
- Protected Member Functions inherited from ib::logger
 logger (loglevel level, int err)
 Constructor. More...
 
template<class... Args>
 logger (loglevel level, int err, Args &&... args)
 Constructor. More...
 
 logger (loglevel level)
 Constructor. More...
 
- Static Protected Member Functions inherited from ib::logger
template<class... Args>
static std::string msg (int err, Args &&... args)
 Format an error message. More...
 
- Static Protected Attributes inherited from ib::logger
static constexpr const char * PREFIX = "InnoDB: "
 String prefix for all log messages. More...
 

Detailed Description

The class info is used to emit informational log messages.

It is to be used similar to std::cout. But the log messages will be emitted only when the dtor is called. The preferred usage of this class is to make use of unnamed temporaries as follows:

info() << "The server started successfully.";

In the above usage, the temporary object will be destroyed at the end of the statement and hence the log message will be emitted at the end of the statement. If a named object is created, then the log message will be emitted only when it goes out of scope or destroyed.

Constructor & Destructor Documentation

◆ info() [1/2]

ib::info::info ( )
inline

Default constructor uses ER_IB_MSG_0.

◆ info() [2/2]

template<class... Args>
ib::info::info ( int  err,
Args &&...  args 
)
inlineexplicit

Constructor.

Parameters
[in]errError code from errmsg-*.txt.
[in]argsVariable length argument list

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