mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-11 18:35:46 +02:00
chore: limit traffic logger only to the main interface (#2877)
This commit is contained in:
parent
eb164be596
commit
dd437693f6
1 changed files with 5 additions and 3 deletions
|
@ -968,9 +968,11 @@ Connection::ParserStatus Connection::ParseRedis(SinkReplyBuilder* orig_builder)
|
|||
|
||||
bool has_more = consumed < io_buf_.InputLen();
|
||||
|
||||
if (tl_traffic_logger.log_file) // Log command as soon as we receive it
|
||||
LogTraffic(id_, has_more, absl::MakeSpan(parse_args));
|
||||
|
||||
if (tl_traffic_logger.log_file) {
|
||||
if (IsMain()) { // log only on the main interface.
|
||||
LogTraffic(id_, has_more, absl::MakeSpan(parse_args));
|
||||
}
|
||||
}
|
||||
DispatchCommand(has_more, dispatch_sync, dispatch_async);
|
||||
}
|
||||
io_buf_.ConsumeInput(consumed);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue