mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +00:00
Increase logging channel capacity (#1570)
## Issue Addressed #1464 ## Proposed Changes Increase the slog-async log channel size from the default of 128 to 2048 to reduce the number of dropped logs. ## Additional Info
This commit is contained in:
@@ -9,6 +9,8 @@ mod server;
|
||||
pub use cli::cli_app;
|
||||
use config::BootNodeConfig;
|
||||
|
||||
const LOG_CHANNEL_SIZE: usize = 2048;
|
||||
|
||||
/// Run the bootnode given the CLI configuration.
|
||||
pub fn run(matches: &ArgMatches<'_>, debug_level: String) {
|
||||
let debug_level = match debug_level.as_str() {
|
||||
@@ -26,7 +28,9 @@ pub fn run(matches: &ArgMatches<'_>, debug_level: String) {
|
||||
let decorator = slog_term::TermDecorator::new().build();
|
||||
let decorator = logging::AlignedTermDecorator::new(decorator, logging::MAX_MESSAGE_WIDTH);
|
||||
let drain = slog_term::FullFormat::new(decorator).build().fuse();
|
||||
slog_async::Async::new(drain).build()
|
||||
slog_async::Async::new(drain)
|
||||
.chan_size(LOG_CHANNEL_SIZE)
|
||||
.build()
|
||||
};
|
||||
|
||||
let drain = match debug_level {
|
||||
|
||||
Reference in New Issue
Block a user