1
0
mirror of https://github.com/facebookincubator/mvfst.git synced 2025-11-09 10:00:57 +03:00
Files
mvfst/quic/logging/QLoggerTypes.cpp
Bonnie Xu 1affb7e49d Interface for QLogger
Summary:
Interface for QLogger:
- Takes in a Quic packet (`VersionNegotiation`, `RegularQuicWritePacket`, `RegularQuicPacket`)
- Stores it in QLogger
  - each packet is an event
  - each frame becomes a log

Reviewed By: sharma95

Differential Revision: D15581299

fbshipit-source-id: dedf933f47e2e8769109aa1e45ff38c2bf013714
2019-06-14 11:48:34 -07:00

23 lines
540 B
C++

/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
#include <quic/logging/QLoggerTypes.h>
namespace quic {
std::string toString(EventType type) {
switch (type) {
case EventType::PacketSent:
return "PACKET_SENT";
case EventType::PacketReceived:
return "PACKET_RECEIVED";
}
LOG(WARNING) << "toString has unhandled QLog event type";
return "UNKNOWN";
}
} // namespace quic