RESTinio

Public Member Functions | Private Member Functions | Private Attributes | List of all members
restinio::ostream_logger_t< Lock > Class Template Reference

Logger for std::ostream. More...

`#include <ostream_logger.hpp>`

## Public Member Functions
| ostream_logger_t (const ostream_logger_t &)=delete
ostream_logger_t & | operator= (const ostream_logger_t &)=delete
| ostream_logger_t () noexcept
| ostream_logger_t (std::ostream &out) noexcept
template<typename Message_Builder >
void | trace (Message_Builder &&msg_builder)
template<typename Message_Builder >
void | info (Message_Builder &&msg_builder)
template<typename Message_Builder >
void | warn (Message_Builder &&msg_builder)
template<typename Message_Builder >
void | error (Message_Builder &&msg_builder)

## Private Member Functions
void | log_message (const char *tag, const std::string &msg)

## Private Attributes
Lock | m_lock
std::ostream * | m_out

## Detailed Description

template<typename Lock>
class restinio::ostream_logger_t< Lock >

Logger for std::ostream.

Note
  It is not efficient.

Examples
  sample/hello_world_sendfile/main.cpp, and sample/hello_world_sendfile_https/main.cpp.

Definition at line 32 of file ostream_logger.hpp.

## Constructor & Destructor Documentation

## ◆ ostream_logger_t() [1/3]

template<typename Lock >

restinio::ostream_logger_t< Lock >::ostream_logger_t | ( | const ostream_logger_t< Lock > & |  | ) |
| delete

## ◆ ostream_logger_t() [2/3]

template<typename Lock >

restinio::ostream_logger_t< Lock >::ostream_logger_t | ( |  | ) |
| inline noexcept

Definition at line 38 of file ostream_logger.hpp.

## ◆ ostream_logger_t() [3/3]

template<typename Lock >

restinio::ostream_logger_t< Lock >::ostream_logger_t | ( | std::ostream & | out | ) |
| inline noexcept

Definition at line 42 of file ostream_logger.hpp.

## Member Function Documentation

## ◆ error()

template<typename Lock >
template<typename Message_Builder >

void restinio::ostream_logger_t< Lock >::error | ( | Message_Builder && | msg_builder | ) |
| inline

Definition at line 69 of file ostream_logger.hpp.

## ◆ info()

template<typename Lock >
template<typename Message_Builder >

void restinio::ostream_logger_t< Lock >::info | ( | Message_Builder && | msg_builder | ) |
| inline

Definition at line 55 of file ostream_logger.hpp.

## ◆ log_message()

template<typename Lock >

void restinio::ostream_logger_t< Lock >::log_message | ( | const char * | tag,
|  | const std::string & | msg
| ) |  |
| inline private

Definition at line 76 of file ostream_logger.hpp.

## ◆ operator=()

template<typename Lock >

ostream_logger_t & restinio::ostream_logger_t< Lock >::operator= | ( | const ostream_logger_t< Lock > & |  | ) |
| delete

## ◆ trace()

template<typename Lock >
template<typename Message_Builder >

void restinio::ostream_logger_t< Lock >::trace | ( | Message_Builder && | msg_builder | ) |
| inline

Definition at line 48 of file ostream_logger.hpp.

## ◆ warn()

template<typename Lock >
template<typename Message_Builder >

void restinio::ostream_logger_t< Lock >::warn | ( | Message_Builder && | msg_builder | ) |
| inline

Definition at line 62 of file ostream_logger.hpp.

## Member Data Documentation

## ◆ m_lock

template<typename Lock >

Lock restinio::ostream_logger_t< Lock >::m_lock
| private

Definition at line 98 of file ostream_logger.hpp.

## ◆ m_out

template<typename Lock >

std::ostream* restinio::ostream_logger_t< Lock >::m_out
| private

Definition at line 99 of file ostream_logger.hpp.

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

- restinio/ostream_logger.hpp