SOLA
Loading...
Searching...
No Matches
Public Member Functions | List of all members
natter::logging::Logger Class Reference

#include <logger.h>

Public Member Functions

void addLogger (LoggerPtr logger)
 
void logCritical (const std::string &msg) const
 
void logWarning (const std::string &msg) const
 
void logInfo (const std::string &msg) const
 
void logDebug (const std::string &msg) const
 
void logNewPeer (const std::string &ip, uint16_t port, solanet::UUID uuid, const std::string &topic) const
 
void logRemovePeer (const std::string &ip, uint16_t port, solanet::UUID uuid, const std::string &topic) const
 
void logNewMessage (const std::string &topic, const std::string &msg, solanet::UUID msg_uuid)
 
void logSendFullMsg (solanet::UUID msg_uuid, solanet::UUID uuid, solanet::UUID own_uuid)
 
void logReceiveFullMsg (solanet::UUID msg_uuid, solanet::UUID sender, solanet::UUID own_uuid)
 
void logMinhcastBroadcast (solanet::UUID msg_id, uint32_t level, uint32_t number, uint32_t forward_up_limit, uint32_t forward_down_limit)
 
void logNewNetworkPeer (solanet::UUID uuid, const std::string &ip, uint16_t port, int level, int number)
 
void logReceivedMessages (solanet::UUID node_uuid, solanet::UUID initial_sender, solanet::UUID message, uint32_t round)
 
LogLevel getLogLevel () const
 
void setLogLevel (LogLevel logLevel)
 
bool isLoggingStrings () const
 
void setLogggingStrings (bool log_strings)
 

Detailed Description

Class holding a list of loggers to be called for logging

Member Function Documentation

◆ addLogger()

void natter::logging::Logger::addLogger ( LoggerPtr  logger)

Add logger and use it for upcoming log-function calls

Parameters
loggerlogger to add

◆ getLogLevel()

LogLevel natter::logging::Logger::getLogLevel ( ) const

Returns current log level

Returns
current log level

◆ isLoggingStrings()

bool natter::logging::Logger::isLoggingStrings ( ) const

Checks if logging string messages is enabled

Returns
true if basic logging is activated

◆ logCritical()

void natter::logging::Logger::logCritical ( const std::string &  msg) const

Log critical message

Parameters
msgmessage to log

◆ logDebug()

void natter::logging::Logger::logDebug ( const std::string &  msg) const

Log debug message

Parameters
msgmessage to log

◆ logInfo()

void natter::logging::Logger::logInfo ( const std::string &  msg) const

Log info message

Parameters
msgmessage to log

◆ logNewMessage()

void natter::logging::Logger::logNewMessage ( const std::string &  topic,
const std::string &  msg,
solanet::UUID  msg_uuid 
)

Log receive of application message

Parameters
topictopic of message
msgmessage content
msg_uuidmessage uuid

◆ logNewPeer()

void natter::logging::Logger::logNewPeer ( const std::string &  ip,
uint16_t  port,
solanet::UUID  uuid,
const std::string &  topic 
) const

Log new peer-topic connection

Parameters
ipip of new peer
portport of new peer
uuiduuid of new peer
topictopic the peer was added to

◆ logReceiveFullMsg()

void natter::logging::Logger::logReceiveFullMsg ( solanet::UUID  msg_uuid,
solanet::UUID  sender,
solanet::UUID  own_uuid 
)

Log receiving full message

Parameters
msg_uuidmessage uuid
sendersender node uuid
own_uuidown node uuid

◆ logRemovePeer()

void natter::logging::Logger::logRemovePeer ( const std::string &  ip,
uint16_t  port,
solanet::UUID  uuid,
const std::string &  topic 
) const

Log removal of peer

Parameters
ipip of removed peer
portport of removed peer
uuiduuid of removed peer
topictopic the peer was removed from

◆ logSendFullMsg()

void natter::logging::Logger::logSendFullMsg ( solanet::UUID  msg_uuid,
solanet::UUID  uuid,
solanet::UUID  own_uuid 
)

Log sending full message

Parameters
msg_uuidmessage uuid
uuidtarget node uuid
own_uuidown node uuid

◆ logWarning()

void natter::logging::Logger::logWarning ( const std::string &  msg) const

Log warning message

Parameters
msgmessage to log

◆ setLogggingStrings()

void natter::logging::Logger::setLogggingStrings ( bool  log_strings)

Sets if string messages should be logged

Parameters
log_stringstrue if string messages should be logged

◆ setLogLevel()

void natter::logging::Logger::setLogLevel ( LogLevel  logLevel)

Sets logLevel as current log level

Parameters
logLevelnew log level

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