Skip to content

Commit

Permalink
draft: add tag and time to BinaryAccessLog
Browse files Browse the repository at this point in the history
  • Loading branch information
Keksoj committed Feb 2, 2024
1 parent c42001d commit 1aad340
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions command/src/command.proto
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,11 @@ message BinaryAccessLog {
required uint64 bytes_in = 14;
required uint64 bytes_out = 15;
optional string user_agent = 16;
// custom tags as key-values, for instance owner_id: MyOrganisation
map<string, string> tags = 17;
// short description of which process sends the log, for instance: "WRK-02"
required string tag = 18;
required Uint128 time = 19;
}

// this matches the way the rusty_ulid crate represent a ULID
Expand Down
4 changes: 3 additions & 1 deletion command/src/logging.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ use mio::net::UnixDatagram;
use prost::{encoding::encoded_len_varint, Message};
use rand::{distributions::Alphanumeric, thread_rng, Rng};

use crate::{access_logs::RequestRecord, bind_format_args, config::Config};
pub use crate::access_logs::*;

use crate::{bind_format_args, config::Config};

thread_local! {
pub static LOGGER: RefCell<Logger> = RefCell::new(Logger::new());
Expand Down

0 comments on commit 1aad340

Please sign in to comment.