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:
realbigsean
2020-08-31 02:36:19 +00:00
parent adea7992f8
commit c34e8efb12
2 changed files with 18 additions and 5 deletions

View File

@@ -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 {