Loading...
Searching...
No Matches
websocketpp::log::basic< concurrency, names > Class Template Reference

Basic logger that outputs to an ostream. More...

`#include <basic.hpp>`

Inheritance diagram for websocketpp::log::basic< concurrency, names >:

## Public Member Functions

| basic (channel_type_hint::value h=channel_type_hint::access)
| basic (std::ostream *out)
| basic (level c, channel_type_hint::value h=channel_type_hint::access)
| basic (level c, std::ostream *out)
| ~basic ()
| Destructor.
| basic (basic< concurrency, names > const &other)
| Copy constructor.
void | set_ostream (std::ostream *out=&std::cout)
void | set_channels (level channels)
void | clear_channels (level channels)
void | write (level channel, std::string const &msg)
| Write a string message to the given channel.
void | write (level channel, char const *msg)
| Write a cstring message to the given channel.
_WEBSOCKETPP_CONSTEXPR_TOKEN_ bool | static_test (level channel) const
bool | dynamic_test (level channel)

## Protected Types

typedef concurrency::scoped_lock_type | scoped_lock_type
typedef concurrency::mutex_type | mutex_type

## Protected Attributes

mutex_type | m_lock

## Detailed Description

template<typename concurrency, typename names>
class websocketpp::log::basic< concurrency, names >

Basic logger that outputs to an ostream.

Definition at line 59 of file basic.hpp.

## Member Typedef Documentation

## mutex_type

template<typename concurrency, typename names>

typedef concurrency::mutex_type websocketpp::log::basic< concurrency, names >::mutex_type

protected

Definition at line 170 of file basic.hpp.

## scoped_lock_type

template<typename concurrency, typename names>

typedef concurrency::scoped_lock_type websocketpp::log::basic< concurrency, names >::scoped_lock_type

protected

Definition at line 169 of file basic.hpp.

## Constructor & Destructor Documentation

## basic() [1/5]

template<typename concurrency, typename names>

websocketpp::log::basic< concurrency, names >::basic | ( | channel_type_hint::value | h = channel_type_hint::access | ) |

inline

Definition at line 61 of file basic.hpp.

## basic() [2/5]

template<typename concurrency, typename names>

websocketpp::log::basic< concurrency, names >::basic | ( | std::ostream * | out | ) |

inline

Definition at line 67 of file basic.hpp.

## basic() [3/5]

template<typename concurrency, typename names>

websocketpp::log::basic< concurrency, names >::basic | ( | level | c,
|  | channel_type_hint::value | h = channel_type_hint::access )

inline

Definition at line 72 of file basic.hpp.

## basic() [4/5]

template<typename concurrency, typename names>

websocketpp::log::basic< concurrency, names >::basic | ( | level | c,
|  | std::ostream * | out )

inline

Definition at line 78 of file basic.hpp.

## ~basic()

template<typename concurrency, typename names>

websocketpp::log::basic< concurrency, names >::~basic | ( |  | ) |

inline

Destructor.

Definition at line 84 of file basic.hpp.

## basic() [5/5]

template<typename concurrency, typename names>

websocketpp::log::basic< concurrency, names >::basic | ( | basic< concurrency, names > const & | other | ) |

inline

Copy constructor.

Definition at line 87 of file basic.hpp.

## Member Function Documentation

## clear_channels()

template<typename concurrency, typename names>

void websocketpp::log::basic< concurrency, names >::clear_channels | ( | level | channels | ) |

inline

Definition at line 127 of file basic.hpp.

## dynamic_test()

template<typename concurrency, typename names>

bool websocketpp::log::basic< concurrency, names >::dynamic_test | ( | level | channel | ) |

inline

Definition at line 164 of file basic.hpp.

## set_channels()

template<typename concurrency, typename names>

void websocketpp::log::basic< concurrency, names >::set_channels | ( | level | channels | ) |

inline

Definition at line 117 of file basic.hpp.

## set_ostream()

template<typename concurrency, typename names>

void websocketpp::log::basic< concurrency, names >::set_ostream | ( | std::ostream * | out = &std::cout | ) |

inline

Definition at line 113 of file basic.hpp.

## static_test()

template<typename concurrency, typename names>

_WEBSOCKETPP_CONSTEXPR_TOKEN_ bool websocketpp::log::basic< concurrency, names >::static_test | ( | level | channel | ) | const

inline

Definition at line 160 of file basic.hpp.

## write() [1/2]

template<typename concurrency, typename names>

void websocketpp::log::basic< concurrency, names >::write | ( | level | channel,
|  | char const * | msg )

inline

Write a cstring message to the given channel.

Parameters

  channel | The channel to write to
  msg | The message to write

Definition at line 151 of file basic.hpp.

## write() [2/2]

template<typename concurrency, typename names>

void websocketpp::log::basic< concurrency, names >::write | ( | level | channel,
|  | std::string const & | msg )

inline

Write a string message to the given channel.

Parameters

  channel | The channel to write to
  msg | The message to write

Definition at line 137 of file basic.hpp.

## Member Data Documentation

## m_lock

template<typename concurrency, typename names>

mutex_type websocketpp::log::basic< concurrency, names >::m_lock

protected

Definition at line 171 of file basic.hpp.

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

- websocketpp/logger/basic.hpp