My Project 3.7.1
C++ Distributed Hash Table
Loading...
Searching...
No Matches
dht::log Namespace Reference

Classes

struct  source_loc
struct  LogFormat
struct  type_identity
struct  Logger

Typedefs

using LogMethod = std::function<void(source_loc, LogLevel, std::string_view, std::string&&)>
template<class _Tp>
using type_identity_t = typename type_identity<_Tp>::type

Enumerations

enum class  LogLevel { debug , warning , error }

Functions

OPENDHT_PUBLIC std::shared_ptr< LoggergetStdLogger ()
OPENDHT_PUBLIC std::shared_ptr< LoggergetFileLogger (const std::string &path)
OPENDHT_PUBLIC std::shared_ptr< LoggergetSyslogLogger (const char *name)
OPENDHT_PUBLIC void enableLogging (dht::DhtRunner &dht)
OPENDHT_PUBLIC void enableFileLogging (dht::DhtRunner &dht, const std::string &path)
OPENDHT_PUBLIC void disableLogging (dht::DhtRunner &dht)
OPENDHT_PUBLIC void enableSyslog (dht::DhtRunner &dht, const char *name)

Detailed Description

Logging-related functions

Typedef Documentation

◆ LogMethod

using dht::log::LogMethod = std::function<void(source_loc, LogLevel, std::string_view, std::string&&)>

Definition at line 80 of file logger.h.

◆ type_identity_t

template<class _Tp>
using dht::log::type_identity_t = typename type_identity<_Tp>::type

Definition at line 110 of file logger.h.

Enumeration Type Documentation

◆ LogLevel

enum class dht::log::LogLevel
strong

Definition at line 78 of file logger.h.