1212#include < ydb/core/tablet_flat/flat_cxx_database.h>
1313#include < ydb/core/tablet_flat/tablet_flat_executor.h>
1414
15+ #include < ydb/library/protobuf_printer/security_printer.h>
16+
1517#include < util/generic/algorithm.h>
1618
1719namespace NKikimr ::NSchemeShard {
@@ -85,6 +87,14 @@ NKikimrScheme::TEvModifySchemeTransaction GetRecordForPrint(const NKikimrScheme:
8587 return recordForPrint;
8688}
8789
90+ TString PrintSecurely (const NKikimrScheme::TEvModifySchemeTransaction& record) {
91+ TSecurityTextFormatPrinter<NKikimrScheme::TEvModifySchemeTransaction> printer;
92+ printer.SetSingleLineMode (true );
93+ TString string;
94+ printer.PrintToString (record, &string);
95+ return string;
96+ }
97+
8898THolder<TProposeResponse> TSchemeShard::IgniteOperation (TProposeRequest& request, TOperationContext& context) {
8999 THolder<TProposeResponse> response = nullptr ;
90100
@@ -183,7 +193,7 @@ THolder<TProposeResponse> TSchemeShard::IgniteOperation(TProposeRequest& request
183193 << " , already accepted parts: " << operation->Parts .size ()
184194 << " , propose result status: " << NKikimrScheme::EStatus_Name (response->Record .GetStatus ())
185195 << " , with reason: " << response->Record .GetReason ()
186- << " , tx message: " << GetRecordForPrint (record). ShortDebugString ( ));
196+ << " , tx message: " << PrintSecurely (record));
187197 }
188198
189199 Y_VERIFY_S (context.IsUndoChangesSafe (),
@@ -194,7 +204,7 @@ THolder<TProposeResponse> TSchemeShard::IgniteOperation(TProposeRequest& request
194204 << " , already accepted parts: " << operation->Parts .size ()
195205 << " , propose result status: " << NKikimrScheme::EStatus_Name (response->Record .GetStatus ())
196206 << " , with reason: " << response->Record .GetReason ()
197- << " , tx message: " << GetRecordForPrint (record). ShortDebugString ( ));
207+ << " , tx message: " << PrintSecurely (record));
198208
199209 context.OnComplete = {}; // recreate
200210 context.DbChanges = {};
@@ -237,7 +247,7 @@ struct TSchemeShard::TTxOperationPropose: public NTabletFlatExecutor::TTransacti
237247
238248 LOG_DEBUG_S (ctx, NKikimrServices::FLAT_TX_SCHEMESHARD,
239249 " TTxOperationPropose Execute"
240- << " , message: " << GetRecordForPrint (Request->Get ()->Record ). ShortDebugString ( )
250+ << " , message: " << PrintSecurely (Request->Get ()->Record )
241251 << " , at schemeshard: " << selfId);
242252
243253 txc.DB .NoMoreReadsForTx ();
0 commit comments