summaryrefslogtreecommitdiff
path: root/absl/log/internal/log_message.cc
Commit message (Collapse)AuthorAge
* Instantiate LogMessage::CopyToEncodedBuffer separately for literals and ↵Gravatar Andy Getzendanner2023-05-01
| | | | | | | | | | | non-literals to save an instruction at each operator<<(string) callsite. The operator<<s get inlined at the callsite. The saved instruction is a 'load immediate' to put the StringType argument in a register for passing. This does make the logging TU slightly larger, but it will be an overall size win for all but the smallest programs. Smaller, faster code at callsites is worth it anyway. PiperOrigin-RevId: 528569773 Change-Id: Id8185266a975a12ab6f1a553c2c0846261822396
* Shrink most LOG callsites by one instruction (SysV x86_64 ABI) by ↵Gravatar Andy Getzendanner2023-04-28
| | | | | | | | | | | dispatching to per-severity constructors and omitting the severity argument. In that particular ABI, the empty tag structs are NO_CLASS and don't appear in the generated code. https://godbolt.org/z/crqaPh8Kv PiperOrigin-RevId: 527989179 Change-Id: I365f11f6ca1de2623690d0a04e6f02f7de82b1fc
* Work around GCC -Wuninitialized when initializing a span from an ↵Gravatar Andy Getzendanner2023-01-24
| | | | | | | | | uninitialized array in logging. It's uninitialized on purpose; we'll write into it through the span. PiperOrigin-RevId: 504318917 Change-Id: I79835f0190253b8b470b3ca404f3979715f2a718
* Write (more) directly into the structured buffer from StringifySink, ↵Gravatar Andy Getzendanner2022-11-28
| | | | | | | including for (size_t, char) overload. PiperOrigin-RevId: 491456410 Change-Id: I76dec24b0bd02204fa38419af9247cee38b1cf50
* Zero encoded_remaining when a string field doesn't fit, so that we don't ↵Gravatar Andy Getzendanner2022-11-21
| | | | | | | leave partial data in the buffer (all decoders should ignore it anyway) and to be sure that we don't try to put any subsequent operands in either (there shouldn't be enough space). PiperOrigin-RevId: 490143656 Change-Id: I4d743dd9214013fbd151478ef662d50affd5ff7a
* Release structured logging.Gravatar Andy Getzendanner2022-11-17
| | | | | | | This stores the operands to LOG (and CHECK) as separate fields in a serialized protobuf. The protobuf format is not yet published. PiperOrigin-RevId: 489275799 Change-Id: I86d83671a6b1feb2bddd5bee51552907897ca8eb
* Minor formatting changes in preparation for structured logging...Gravatar Andy Getzendanner2022-11-16
| | | | | PiperOrigin-RevId: 489044912 Change-Id: I1657dd60bcfa2d0fb4b889f27f4f237325b73f08
* Refactor "RAW: " prefix formatting into FormatLogPrefix.Gravatar Andy Getzendanner2022-11-16
| | | | | | | This is used when demoting regular logging inside a LogSink::Send to raw-like to avoid infinite recursive dispatch. PiperOrigin-RevId: 488934154 Change-Id: I0aaaeea0ceaaff3c4394308a7102a55befbef290
* Replace std::atomic_flag with std::atomic<bool> to avoid the C++20Gravatar Derek Mauro2022-11-09
| | | | | | | | | | | | | | | | | deprecation of ATOMIC_FLAG_INIT. Another option would have been to use macros to only initialize std::atomic_flag before C++20, but I decided to use one compilation path instead. The major difference between std::atomic_flag and std::atomic<bool> is that the former is guaranteed to be lock-free, but we already assume std::atomic<bool> is lock-free in many places. https://en.cppreference.com/w/cpp/atomic/atomic_flag PiperOrigin-RevId: 487397075 Change-Id: I3f1c539ec8b2ca58547282e69ed73e93243e8efe
* drop an unused depGravatar Andy Getzendanner2022-11-08
| | | | | PiperOrigin-RevId: 486867412 Change-Id: Ib54b1acaf1ea57f8f377c87261d7d52e9a48784f
* Factor out the internal helper AppendTruncated, which is used and redefined ↵Gravatar Andy Getzendanner2022-11-07
| | | | | | | in a couple places, plus several more that have yet to be released. PiperOrigin-RevId: 486759835 Change-Id: Ib1b24f287f856ca38b691fbce7e747f0f5a34626
* Narrow some _MSC_VER checks to not catch clang-cl.Gravatar Andy Getzendanner2022-11-04
| | | | | PiperOrigin-RevId: 486227733 Change-Id: If492d715e5758971cf7bd0ccd748b47b1424a3c7
* Fix "unsafe narrowing" warnings in absl, 11/n.Gravatar Abseil Team2022-10-06
| | | | | | | | | | | | | | | Addresses failures with the following, in some files: -Wshorten-64-to-32 -Wimplicit-int-conversion -Wsign-compare -Wsign-conversion -Wtautological-unsigned-zero-compare (This specific CL focuses on the logging facility.) Bug: chromium:1292951 PiperOrigin-RevId: 479384741 Change-Id: Id450438ea3781ce25137366ca16757e810020ad4
* Release the Abseil Logging libraryGravatar Gennadiy Rozental2022-08-25
PiperOrigin-RevId: 470080638 Change-Id: I8d9ddfabc7704c383ed5a73abf0411f4c58a4bf7