* Append a Redis query to a log message * * @param query Redis query * @param msg Log message */
| 95 | * @param msg Log message |
| 96 | */ |
| 97 | static inline |
| 98 | void 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. |
no outgoing calls
no test coverage detected