Skip to content

Commit

Permalink
[aptos-logger] Diem -> Aptos
Browse files Browse the repository at this point in the history
  • Loading branch information
gregnazario committed Mar 11, 2022
1 parent 65ffe1d commit 3a51ab2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions crates/aptos-logger/src/aptos_logger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ impl AptosDataBuilder {
filter_builder.build()
};

DiemFilter {
FilterPair {
local_filter,
remote_filter,
}
Expand Down Expand Up @@ -292,14 +292,14 @@ impl AptosDataBuilder {
}

/// A combination of `Filter`s to control where logs are written
struct DiemFilter {
struct FilterPair {
/// The local printer `Filter` to control what is logged in text output
local_filter: Filter,
/// The remote logging `Filter` to control what is sent to external logging
remote_filter: Filter,
}

impl DiemFilter {
impl FilterPair {
fn enabled(&self, metadata: &Metadata) -> bool {
self.local_filter.enabled(metadata) || self.remote_filter.enabled(metadata)
}
Expand All @@ -308,7 +308,7 @@ impl DiemFilter {
pub struct AptosData {
sender: Option<SyncSender<LoggerServiceEvent>>,
printer: Option<Box<dyn Writer>>,
filter: RwLock<DiemFilter>,
filter: RwLock<FilterPair>,
pub(crate) formatter: fn(&LogEntry) -> Result<String, fmt::Error>,
}

Expand Down
2 changes: 1 addition & 1 deletion crates/aptos-logger/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) The Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

//! This crates provides an API for logging in diem.
//! This crates provides an API for logging.
//! # Instrumenting with Logs
//! ## Basic instrumenting with Logs
//!
Expand Down
2 changes: 1 addition & 1 deletion crates/aptos-logger/tests/tracing_translation_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ impl Writer for VecWriter {

#[test]
fn verify_tracing_kvs() {
// set up the diem logger
// set up the logger
let writer = VecWriter::default();
let logs = writer.logs.clone();
AptosData::builder()
Expand Down

0 comments on commit 3a51ab2

Please sign in to comment.