Browse Source

sets huge channel buffer for async logger when trace is enabled

master
Jonathan Strong 6 years ago
parent
commit
1cfad254e0
1 changed files with 7 additions and 4 deletions
  1. +7
    -4
      src/lib.rs

+ 7
- 4
src/lib.rs View File

@@ -46,13 +46,16 @@ pub mod latency;
pub mod hist;

#[cfg(feature = "trace")]
pub const LOG_LEVEL : Severity = Severity::Trace;
pub const LOG_LEVEL: Severity = Severity::Trace;
#[cfg(all(feature = "debug", not(feature = "trace")))]
pub const LOG_LEVEL : Severity = Severity::Debug;
pub const LOG_LEVEL: Severity = Severity::Debug;
#[cfg(not(any(feature = "debug", feature = "trace")))]
pub const LOG_LEVEL : Severity = Severity::Info;
pub const LOG_LEVEL: Severity = Severity::Info;

const CHANNEL_SIZE: usize = 20_000;
#[cfg(not(feature = "trace"))]
const CHANNEL_SIZE: usize = 32_768;
#[cfg(feature = "trace")]
const CHANNEL_SIZE: usize = 2_097_152;

/// converts a chrono::DateTime to an integer timestamp (ns)
///


Loading…
Cancel
Save