userver
C++ Async Framework
Toggle main menu visibility
Loading...
Searching...
No Matches
log.hpp
Go to the documentation of this file.
1
#
pragma
once
2
3
/// @file userver/utils/log.hpp
4
/// @brief Algorithms to aid logging
5
6
#
include
<
cstddef
>
7
#
include
<
string
>
8
#
include
<
string_view
>
9
10
USERVER_NAMESPACE_BEGIN
11
12
/// Algorithms to aid logging
13
namespace
utils
::
log
{
14
15
/// @brief returns `data` converted to hex and truncated to `limit`
16
std::string
ToLimitedHex
(std::string_view data, size_t limit);
17
18
/// @brief if `data` in utf-8, returns `data` truncated to `limit`
19
/// otherwise returns stub
20
std::string
ToLimitedUtf8
(std::string_view data, size_t limit);
21
22
/// @overload
23
/// Does not copy `data` if it is returned as is
24
std::string
ToLimitedUtf8
(std::string&& data, size_t limit);
25
26
}
// namespace utils::log
27
28
USERVER_NAMESPACE_END
userver
utils
log.hpp
Generated on
for userver by
Doxygen
1.17.0