20 using std::chrono::system_clock;
28 unsigned int lineNumber,
31 : category_{category},
45 system_clock::time_point timestamp,
47 unsigned int lineNumber,
85 size_t sanitizedLength = 0;
90 }
else if (static_cast<unsigned char>(
c) < 0x20) {
96 }
else if (
c ==
'\t') {
101 }
else if (
c == 0x7f) {
103 sanitizedLength += 4;
112 if (sanitizedLength == rawMessage_.size()) {
117 for (
const char c : rawMessage_) {
121 }
else if (static_cast<unsigned char>(
c) < 0x20) {
122 if (
c ==
'\n' ||
c ==
'\t') {
125 static constexpr
StringPiece hexdigits{
"0123456789abcdef"};
126 std::array<char, 4>
data{
127 {
'\\',
'x', hexdigits[(
c >> 4) & 0xf], hexdigits[
c & 0xf]}};
130 }
else if (
c == 0x7f) {
131 constexpr std::array<char, 4>
data{{
'\\',
'x',
'7',
'f'}};
unsigned int const lineNumber_
constexpr detail::Map< Move > move
std::chrono::steady_clock::time_point now()
std::string const rawMessage_
folly::StringPiece const filename_
—— Concurrent Priority Queue Implementation ——
const LogCategory *const category_
size_type rfind(value_type c) const
constexpr auto data(C &c) -> decltype(c.data())
Range subpiece(size_type first, size_type length=npos) const
std::chrono::system_clock::time_point const timestamp_
static const size_type npos
LogMessage(const LogCategory *category, LogLevel level, folly::StringPiece filename, unsigned int lineNumber, folly::StringPiece functionName, std::string &&msg)
folly::StringPiece getFileBaseName() const
folly::StringPiece const functionName_