mirror of
https://github.com/overte-org/overte.git
synced 2025-04-18 21:57:10 +02:00
add doxygen comments to refactored Logging class
This commit is contained in:
parent
613334074f
commit
bbc051a764
1 changed files with 16 additions and 0 deletions
|
@ -20,12 +20,28 @@ const char STAT_TYPE_TIMER = 't';
|
|||
const char STAT_TYPE_COUNTER = 'c';
|
||||
const char STAT_TYPE_GAUGE = 'g';
|
||||
|
||||
/// Handles custom message handling and sending of stats/logs to Logstash instance
|
||||
class Logging {
|
||||
public:
|
||||
/// \return the socket used to send stats to logstash
|
||||
static sockaddr* socket();
|
||||
|
||||
/// checks if this target should send stats to logstash, given its current environment
|
||||
/// \return true if the caller should send stats to logstash
|
||||
static bool shouldSendStats();
|
||||
|
||||
/// stashes a float value to Logstash instance
|
||||
/// \param statType a stat type from the constants in this file
|
||||
/// \param key the key at which to store the stat
|
||||
/// \param value the value to store
|
||||
static void stashValue(char statType, const char* key, float value);
|
||||
|
||||
/// sets the target name to output via the verboseMessageHandler, called once before logging begins
|
||||
/// \param targetName the desired target name to output in logs
|
||||
static void setTargetName(const char* targetName);
|
||||
|
||||
/// a qtMessageHandler that can be hooked up to a target that links to Qt
|
||||
/// prints various process, message type, and time information
|
||||
static void verboseMessageHandler(QtMsgType type, const QMessageLogContext& context, const QString &message);
|
||||
private:
|
||||
static sockaddr_in logstashSocket;
|
||||
|
|
Loading…
Reference in a new issue