<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ydb/library/cpp/yt/logging/unittests, branch main</title>
<subtitle>Mirror of YDB github repos</subtitle>
<id>https://code.mastervirt.ru/ydb/atom?h=main</id>
<link rel='self' href='https://code.mastervirt.ru/ydb/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/'/>
<updated>2026-07-17T09:07:46Z</updated>
<entry>
<title>YT-28451: Add tagged logging API and opaque event payload</title>
<updated>2026-07-17T09:07:46Z</updated>
<author>
<name>babenko</name>
<email>babenko@yandex-team.com</email>
</author>
<published>2026-07-16T07:32:17Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=cc4f0cb52cee106a1e84c653823087861b8c8df5'/>
<id>urn:sha1:cc4f0cb52cee106a1e84c653823087861b8c8df5</id>
<content type='text'>
Replace `TLogEvent::MessageRef` with an opaque `Payload` that carries the message
together with structured key/value tags, deferring tag rendering to the consumer
(logging thread).

- Add the `TTaggedPayloadWriter`/`TTaggedPayloadReader` codec (`NDetail`), with a
  per-thread chunk-cached builder so tagged logging does no per-message heap
  allocation.
- Model the payload as a typed `TLogEventPayload` — a `std::variant` of the opaque
  strong typedefs `TTaggedLogEventPayload` and `TStructuredLogEventPayload` (each
  over `TSharedRef`). The active alternative identifies the event kind, so the
  separate `ELogMessageKind` enum and `TLogEvent::MessageKind` field are removed;
  consumers dispatch via `std::holds_alternative`/`std::get` instead of a tag.
- Add the fluent `YT_TLOG_*` API: `YT_TLOG_INFO("Message").With(key, value)` and
  `.With(key, value, "%spec")`; disabled levels skip argument evaluation.
- Add well-known tags: `.With(value)` attaches a value under a statically known
  key resolved by ADL (e.g. `.With(error)` for the `Error` tag).
- Teach the plain-text and structured formatters to render tags; add the
  `enable_native_tags` knob to emit tags into a nested structured attribute.
- Add producer-side benchmarks. The tagged API is cheaper than `YT_LOG_*` for
  tagged calls and on par for tag-free ones:

#|
|| **Producer call** | **`YT_LOG_*`** | **`YT_TLOG_*`** | **Δ** ||
|| no tags   | 81 ns  | 82 ns  | +2%  ||
|| 1 tag     | 124 ns | 88 ns  | -29% ||
|| 2 tags    | 140 ns | 101 ns | -28% ||
|| 3 tags    | 372 ns | 283 ns | -24% ||
|#

--

#| || **&lt;a href="https://nda.ya.ru/t/p0sVNSOC7ijzFF" target="_blank"&gt;![](https://nda.ya.ru/t/mAiQIjHx7Mm3JC =30x) Echo tests&lt;/a&gt;** || |#
commit_hash:70efc90e5c2b71e5311415a4e4508db42ff28971
</content>
</entry>
<entry>
<title>YT-27605: YT_LOG_FATAL_AND_THROW captures log message in error attribute</title>
<updated>2026-03-09T19:06:26Z</updated>
<author>
<name>babenko</name>
<email>babenko@yandex-team.com</email>
</author>
<published>2026-03-09T18:39:03Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=bd88f4af4c5aeb8d8505113ca9cfcb660518d2e4'/>
<id>urn:sha1:bd88f4af4c5aeb8d8505113ca9cfcb660518d2e4</id>
<content type='text'>
I'm quite unhappy with the amount of copy-pasted and slightly altered code but the differences between `YT_LOG_ALERT_AND_THROW` and `YT_LOG_EVENT` are too subtle for a reasonable generalization.

This commit also fixes some misplaced `[[(un)likely]]` annotations.
commit_hash:3eda6b52e0e0cea0daf4d996602d446de2d7d732
</content>
</entry>
<entry>
<title>Intermediate changes</title>
<updated>2024-11-29T15:40:16Z</updated>
<author>
<name>robot-piglet</name>
<email>robot-piglet@yandex-team.com</email>
</author>
<published>2024-11-29T15:15:29Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=2aee7cda6c758679145563340ff94fc652670ea1'/>
<id>urn:sha1:2aee7cda6c758679145563340ff94fc652670ea1</id>
<content type='text'>
commit_hash:60e005cdf76d5bff2a370a6b8f35ef4f6792f414
</content>
</entry>
<entry>
<title>Fancier error messages upon static analysis check failure</title>
<updated>2024-10-16T08:12:35Z</updated>
<author>
<name>arkady-e1ppa</name>
<email>arkady-e1ppa@yandex-team.com</email>
</author>
<published>2024-10-16T07:57:50Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=06315bfc9a9c00a74cf70cd35d65c959bd036f7c'/>
<id>urn:sha1:06315bfc9a9c00a74cf70cd35d65c959bd036f7c</id>
<content type='text'>
commit_hash:f939fba86939275047d2eca49b11bec3d0ea3ce7
</content>
</entry>
<entry>
<title>YT-21868: Enable stat analysis in some other places</title>
<updated>2024-06-13T14:13:41Z</updated>
<author>
<name>arkady-e1ppa</name>
<email>arkady-e1ppa@yandex-team.com</email>
</author>
<published>2024-06-13T13:50:14Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=3a8a5fac5ba669fa5bed1ccd92e75bdfc6d30d21'/>
<id>urn:sha1:3a8a5fac5ba669fa5bed1ccd92e75bdfc6d30d21</id>
<content type='text'>
We slightly rework inner workings of stat analysis. For almost any sane use case the behavior is identical, but should compile a little faster.

If you send string literals like `char[N]` or `const char*` make them constexpr. If you can't (e.g. `ex.what()` case) wrap it in `TStringBuf`, if you want the "by the book; 100% right" solution then wrap it in `TRuntimeFormat` instead.

`SetRequestInfo` methods now statically checks the format. Only one error was found -- hooray!

Some other internal stuff was added, a lot removed -- don't worry about it. You won't be able to see the difference
62050dfe8a9cedc1289f18e80397ff33a8e2ecdb
</content>
</entry>
<entry>
<title>More cosmetic issues</title>
<updated>2024-06-11T07:05:50Z</updated>
<author>
<name>arkady-e1ppa</name>
<email>arkady-e1ppa@yandex-team.com</email>
</author>
<published>2024-06-11T06:52:09Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=72cd1bd2a9b1c94a08343c8a8e21e6af4037ce28'/>
<id>urn:sha1:72cd1bd2a9b1c94a08343c8a8e21e6af4037ce28</id>
<content type='text'>
810902d6e6c3104880e1ab3b34d29a8aa4bec21b
</content>
</entry>
<entry>
<title>YT-21868: Static analysis of format string in logging</title>
<updated>2024-05-30T18:57:42Z</updated>
<author>
<name>arkady-e1ppa</name>
<email>arkady-e1ppa@yandex-team.com</email>
</author>
<published>2024-05-30T18:48:06Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=d6adb2d70464c9eb08b2b24076be43c44d5a8b74'/>
<id>urn:sha1:d6adb2d70464c9eb08b2b24076be43c44d5a8b74</id>
<content type='text'>
Added static analysis to format of YT_LOG_XXX macro's. We expect you to write format string as first or the second argument and follow the rules as if you are writing arguments for `NYT::Format`, which match those of printf: https://en.cppreference.com/w/cpp/io/c/fprintf plus few extra flags like 'v'. At the moment analyser checks if flags sequences is
1. Correctly terminated
2. Only contains specifiers valid for a given argument (if we are parsing nth argument of type T, then T must have all specifiers from its list of Conversion or Flag specifiers.

(2) Also means that the number of flag sequences must match the number of arguments supplied to format.

You can specialize `TFormatArg&lt;T&gt;` which is used to determine allowed Conversion and Flag specifiers to customise rules of static analysis. E.g. you can introduce new flags to the mix which you promise to parse in the related FormatValue function.

If you feel like this produces to much overhead in terms of compile time, you are free to use macro YT_DISABLE_FORMAT_STATIC_ANALYSIS to turn the entire thing into a no-op. We have measured compile time to be affected by roughly 3-5% in a log intensive files.
ae6def509474e8a42027bb4ed84ac040509b7c85
</content>
</entry>
<entry>
<title>YT-19210: expose YQL shared library for YT.</title>
<updated>2023-07-28T21:02:16Z</updated>
<author>
<name>max42</name>
<email>max42@yandex-team.com</email>
</author>
<published>2023-07-28T21:02:16Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=73b89de71748a21e102d27b9f3ed1bf658766cb5'/>
<id>urn:sha1:73b89de71748a21e102d27b9f3ed1bf658766cb5</id>
<content type='text'>
After this, a new target libyqlplugin.so appears. in open-source cmake build.
Diff in open-source YDB repo looks like the following: https://paste.yandex-team.ru/f302bdb4-7ef2-4362-91c7-6ca45f329264</content>
</entry>
<entry>
<title>Revert "YT-19324: move YT provider to ydb/library/yql"</title>
<updated>2023-06-30T08:13:34Z</updated>
<author>
<name>max42</name>
<email>max42@yandex-team.com</email>
</author>
<published>2023-06-30T08:13:34Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=3e1899838408bbad47622007aa382bc8a2b01f87'/>
<id>urn:sha1:3e1899838408bbad47622007aa382bc8a2b01f87</id>
<content type='text'>
This reverts commit ca272f12fdd0e8d5c3e957fc87939148f1caaf72, reversing
changes made to 49f8acfc8b0b5c0071b804423bcf53fda26c7c12.</content>
</entry>
<entry>
<title>YT-19324: move YT provider to ydb/library/yql</title>
<updated>2023-06-30T00:37:03Z</updated>
<author>
<name>max42</name>
<email>max42@yandex-team.com</email>
</author>
<published>2023-06-30T00:37:03Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=fac2bd72b4b31ec3238292caf8fb2a8aaa6d6c4a'/>
<id>urn:sha1:fac2bd72b4b31ec3238292caf8fb2a8aaa6d6c4a</id>
<content type='text'>
This commit is formed by the following script: https://paste.yandex-team.ru/6f92e4b8-efc5-4d34-948b-15ee2accd7e7/text.
This commit has zero effect on all projects that depend on YQL.

The summary of changes:
- `yql/providers/yt -&gt; ydb/library/yql/providers/yt `- the whole implementation of YT provider is moved into YDB code base for further export as a part of YT YQL plugin shared library;
- `yql/providers/stat/{expr_nodes,uploader} -&gt; ydb/library/yql/providers/stat/{expr_nodes,uploader}` - a small interface without implementation and the description of stat expr nodes;
- `yql/core/extract_predicate/ut -&gt; ydb/library/yql/core/extract_predicate/ut`;
- `yql/core/{ut,ut_common} -&gt; ydb/library/yql/core/{ut,ut_common}`;
- `yql/core` is gone;
- `yql/library/url_preprocessing -&gt; ydb/library/yql/core/url_preprocessing`.

**NB**: all new targets inside `ydb/` are under `IF (NOT CMAKE_EXPORT)` clause which disables them from open-source cmake generation and ya make build. They will be enabled in the subsequent commits.</content>
</entry>
</feed>
