Skip to content

NBS-4415: changed log level for ReasonPill #1736

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions ydb/core/tablet/tablet_sys.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@
#include <util/generic/set.h>
#include <util/stream/str.h>

#if defined BLOG_D || defined BLOG_I || defined BLOG_ERROR
#if defined BLOG_D || defined BLOG_I || defined BLOG_ERROR || defined BLOG_LEVEL
#error log macro definition clash
#endif

#define BLOG_LEVEL(level, stream, marker) LOG_LOG_S(*TlsActivationContext, level, NKikimrServices::TABLET_MAIN, "Tablet: " << TabletID() << " " << stream << " Marker# " << marker)
#define BLOG_D(stream, marker) LOG_DEBUG_S(*TlsActivationContext, NKikimrServices::TABLET_MAIN, "Tablet: " << TabletID() << " " << stream << " Marker# " << marker)
#define BLOG_I(stream, marker) LOG_INFO_S(*TlsActivationContext, NKikimrServices::TABLET_MAIN, "Tablet: " << TabletID() << " " << stream << " Marker# " << marker)
#define BLOG_ERROR(stream, marker) LOG_ERROR_S(*TlsActivationContext, NKikimrServices::TABLET_MAIN, "Tablet: " << TabletID() << " " << stream << " Marker# " << marker)
Expand Down Expand Up @@ -1745,7 +1746,10 @@ void TTablet::ReassignYellowChannels(TVector<ui32> &&yellowMoveChannels) {
}

void TTablet::CancelTablet(TEvTablet::TEvTabletDead::EReason reason, const TString &details) {
BLOG_ERROR(
BLOG_LEVEL(
reason == TEvTablet::TEvTabletDead::ReasonPill
? NActors::NLog::PRI_NOTICE
: NActors::NLog::PRI_ERROR,
" Type: " << TTabletTypes::TypeToStr((TTabletTypes::EType)Info->TabletType)
<< ", EReason: " << TEvTablet::TEvTabletDead::Str(reason)
<< ", SuggestedGeneration: " << SuggestedGeneration
Expand Down