MCPcopy Create free account
hub / github.com/Icinga/icinga2 / LogQuery

Function LogQuery

lib/icingadb/redisconnection.cpp:97–114  ·  view source on GitHub ↗

* Append a Redis query to a log message * * @param query Redis query * @param msg Log message */

Source from the content-addressed store, hash-verified

95 * @param msg Log message
96 */
97static inline
98void LogQuery(RedisConnection::Query& query, Log& msg)
99{
100 int i = 0;
101
102 for (std::string_view arg : query) {
103 if (++i == 8) {
104 msg << " ...";
105 break;
106 }
107
108 if (arg.length() > 64) {
109 msg << " '" << arg.substr(0, 61) << "...'";
110 } else {
111 msg << " '" << arg << '\'';
112 }
113 }
114}
115
116/**
117 * Queue a Redis query for sending without waiting for the response in a fire-and-forget manner.

Callers 5

FireAndForgetQueryMethod · 0.85
FireAndForgetQueriesMethod · 0.85
GetResultOfQueryMethod · 0.85
GetResultsOfQueriesMethod · 0.85
WriteItemMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected