4 releases (breaking)
new 0.4.0 | Apr 20, 2025 |
---|---|
0.3.0 | Apr 6, 2025 |
0.2.0 | Apr 3, 2025 |
0.1.0 | Apr 2, 2025 |
#1336 in Network programming
394 downloads per month
115KB
2.5K
SLoC
qlog-rs
qlog-rs
is a library that allows you to log qlog events in your network application.
The qlog structure is based on IETF draft 11 of the specification (latest version at the time of writing).
All supported protocols are behind a feature, so include all the needed protocols in the feature list.
Supported file types:
.sqlog
(JSON text sequences)
Supported protocols:
- QUIC (draft 10, feature =
quic-10
) - MoQ Transfork (custom events, feature =
moq-transfork
)
Usage
Call the following function in your application to start the log file with some file details (title, description...).
QlogWriter::log_file_details(...);
When you want to generate logs, run your application with the QLOGFILE
environment variable, nothing will get logged if this variable isn't specified.
QLOGFILE="qlog_file.sqlog" cargo run --bin your-application
You can use this library if you're implementing your own version of a network protocol (e.g., a QUIC implementation) and want to support logging (if the protocol is supported). Here's an example for QUIC (draft 10).
let event = Event::quic_10_connection_started(local, remote);
QlogWriter::log_event(event);
Dependencies
~2.1–3.5MB
~63K SLoC