Default to RUST_BACKTRACE=1 for more informative validator logs

(cherry picked from commit 4ac15e68cf)
This commit is contained in:
Michael Vines
2020-04-15 22:21:05 -07:00
parent 70b51c0a5a
commit 0c885d6a04

View File

@ -34,6 +34,7 @@ use solana_sdk::{
}; };
use std::{ use std::{
collections::HashSet, collections::HashSet,
env,
fs::{self, File}, fs::{self, File},
io::{self, Read}, io::{self, Read},
net::{SocketAddr, TcpListener, UdpSocket}, net::{SocketAddr, TcpListener, UdpSocket},
@ -1084,6 +1085,11 @@ pub fn main() {
.join(","), .join(","),
); );
// Default to RUST_BACKTRACE=1 for more informative validator logs
if env::var_os("RUST_BACKTRACE").is_none() {
env::set_var("RUST_BACKTRACE", "1")
}
info!("{} {}", crate_name!(), solana_clap_utils::version!()); info!("{} {}", crate_name!(), solana_clap_utils::version!());
info!("Starting validator with: {:#?}", std::env::args_os()); info!("Starting validator with: {:#?}", std::env::args_os());