aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/yt/logging
Commit message (Collapse)AuthorAgeFilesLines
* Fixup logging messages with Fatal or Alert levelyurial2025-05-221-1/+3
| | | | commit_hash:0ef86009943c41963bf269a11bc623e11fc8a381
* Move more checks to the inlined part of IsLevelEnabledbabenko2025-05-203-24/+20
| | | | commit_hash:ad986b1f46f36765b3d80b8e527b1f25ad966d42
* Fix YT_LOG_ALERT_AND_THROWh0pless2025-04-251-4/+14
| | | | commit_hash:5065ec89aed827ce2d112d5f8623dfb0215a5207
* Add new macro to replace some of the YT_VERIFYsh0pless2025-04-231-0/+18
| | | | commit_hash:f4f2e8b9ba31109593c94251f64e1061f00af304
* Make TLogger respect rvaluespogorelov2025-04-093-12/+62
| | | | commit_hash:dc29e989d9edbb7f171ba47632de428289393058
* YT-22593: More trivial TString->std::string migrationsbabenko2025-02-222-3/+3
| | | | | [nodiff:runtime] commit_hash:1ba799aed1703ab7c6304b6da7090b3337f768dd
* Switch to std::string for logging tagsbabenko2025-01-193-22/+62
| | | | | [nodiff:caesar] commit_hash:62fa96ca05b1a4018e2e51e6b589483cd3a44fc4
* Fixed bug in loggingsabdenovch2024-12-251-1/+1
| | | | commit_hash:a31e79330e3ec72361743d932a47fc67f92fb7a0
* Intermediate changesrobot-piglet2024-11-291-4/+0
| | | | commit_hash:60e005cdf76d5bff2a370a6b8f35ef4f6792f414
* Fix regression: static anchors are not updated properlybabenko2024-10-303-19/+51
| | | | commit_hash:ab0bd9b2d0569820e495c714baecb05145ed35bf
* Introduce message_level_overrides to tune log message levels at runtimebabenko2024-10-203-20/+35
| | | | | | | | * Changelog entry Type: feature Add message_level_overrides option to logging config for better run-time tuning. commit_hash:07e9563fd111c437edf7ac0e5dd190781878d8fa
* Fancier error messages upon static analysis check failurearkady-e1ppa2024-10-161-9/+9
| | | | commit_hash:f939fba86939275047d2eca49b11bec3d0ea3ce7
* YT-22512: Static analysis for TError method, ctors and related macrosarkady-e1ppa2024-08-131-7/+1
| | | | | | | | | | | | | | | | | | | | | Static analysis enabled for TError creation and related macros TRuntimeFormat can be used to disable this feature, but requires copying the viewed object. See NYT::TError::DisableFormat overloads to optimize constructions which want to move the given string Note to future readers: TError is not "perfect-forwarding" unfriendly class. This means that the code ``` template <class... TArgs> TError MakeError(TArgs&&... args) { return TError(std::forward<TArgs>(args)...); } ``` will not compile and needs to be properly adjusted (see. TError::Wrap for implementation example) This implies that emplace construction in containers will not work either. Use move construction instead, as it is simply a pointer swap and therefore free Annotations: [nodiff:caesar] cff12f05849402d09a4487bad26ffcd968215dc7
* YT-21868: Fix missing anchor for single messages in YT_LOG_XXX macrosarkady-e1ppa2024-06-141-1/+14
| | | | 438bc5ed4e35d7a3aeffcce25e862d21289d4cad
* YT-21868: Enable stat analysis in some other placesarkady-e1ppa2024-06-135-221/+38
| | | | | | | | | | | 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
* More cosmetic issuesarkady-e1ppa2024-06-114-18/+18
| | | | 810902d6e6c3104880e1ab3b34d29a8aa4bec21b
* YT-21868: Refactor NYT::Formatarkady-e1ppa2024-06-073-5/+12
| | | | | | | | | | | | | | | | | | | | NYT::Format had several problems: 1. There are too many ways to enable printing of T. Not all are equally good. You could specialize TValueFormatter, you could write an overload of FormatValue, you could write an overload of ToString, you could write an overload of operator << for special stream or you could specialize the Out function. 2. If you attempt to print T which cannot be printed, you get a linker error without a proper source location which is very frustrating to work with. 3. There is no static analysis of format string performed even when it is possible. 4. If you write FormatValue overload, you still have to write ToString overload if you want to use this function (and people tend to use it quite a bit, since it is defined for util types and enums. This pr addresses these issues to some extent. Relevant changes: 1. The only way to support NYT::Format is to define the FormatValue overload. Otherwise, you get a compile-time error. 2. Format overloads have changed: Now you have two options for general use: ``` TString Format(TStaticFormat<TArgs...> fmt, TArgs&&... args); TString Format(TRuntimeFormat fmt, TArgs&&... args); ``` Either overload checks if TArg has a FormatValue overload. TStaticFormat performs a compile-time check of flags and the argument count. It binds to any string literal and constexpr string/string_view (and TStringBuf). TRuntimeFormat has to be mentioned explicitly. Otherwise, you will get a compile-time error for using runtime variable as a format. 3(!!!). Types which name begins with NYT:: have a specialization of ToString function which uses FormatValue. Thus, if you write class in namespace NYT and define FormatValue, you get ToString automatically. If your type is not from namespace enclosing NYT, you can just call NYT::ToString for the same effect. This limitation was caused by the fact, that we cannot review all of the external projects code which might inherit from stl classes or adopt some other questionable code practises which may completely break the dispatching mechanism of ToString due to the specialization (there were such cases). Proper documentation of this library will be added soon, so that this interaction is made known. This limitation might be lifted later 77beb68082e10aaf48be1842aad8aba63f26c1bd
* Disable static analysis on old clang versionsarkady-e1ppa2024-06-041-0/+4
| | | | f18a9a891758a7ec308b2a88b2cdf3f0942b2301
* YT-21868: Static analysis of format string in loggingarkady-e1ppa2024-05-305-0/+214
| | | | | | | | | | | | | 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<T>` 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
* Don't use per-TLS anchor countersbabenko2024-05-212-11/+6
| | | | 85eb5ffdc79771c842f049e9392902ac6868cece
* Introduce YT_DEFINE_GLOBAL to help avoiding initialization order fiasco; ↵babenko2024-05-142-1/+10
| | | | | | apply to global loggers in yt/yt/core 787f98549edf6e8d46ac63cdb8db0609ccde42da
* YT-21566: Access thread local variables via noinline functionslukyan2024-04-263-45/+42
| | | | 970c33b44a7bd166b2716d86d3d2053dcaf05d7d
* feat contrib: aiogram 3armenqa2024-01-1912-281/+0
| | | | Relates: https://st.yandex-team.ru/, https://st.yandex-team.ru/
* Use volatile TLS in library/cpp/ytlukyan2023-12-053-9/+11
|
* External build system generator release 65robot-ya-builder2023-12-052-6/+6
| | | | Update tools: yexport, os-yexport
* add darwin-arm64 CMakeListsdcherednik2023-11-204-0/+53
|
* Drop misused __LINE__ in macrobabenko2023-08-021-28/+28
|
* YT-19210: expose YQL shared library for YT.max422023-07-2929-0/+1878
| | | | 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
* Revert "YT-19324: move YT provider to ydb/library/yql"max422023-06-307-1058/+0
| | | | This reverts commit ca272f12fdd0e8d5c3e957fc87939148f1caaf72, reversing changes made to 49f8acfc8b0b5c0071b804423bcf53fda26c7c12.
* YT-19324: move YT provider to ydb/library/yqlmax422023-06-307-0/+1058
| | | | | | | | | | | | | | 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 -> 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} -> 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 -> ydb/library/yql/core/extract_predicate/ut`; - `yql/core/{ut,ut_common} -> ydb/library/yql/core/{ut,ut_common}`; - `yql/core` is gone; - `yql/library/url_preprocessing -> 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.
* remove kikimr/driver DEPENDSqrort2022-12-025-967/+0
|
* validate canons without yatest_commonqrort2022-11-305-0/+967