adjusting logging to not include debug by default

This commit is contained in:
Dustin Carlino 2018-10-06 12:18:12 -07:00
parent da550910c7
commit 661d784b6e
5 changed files with 7 additions and 5 deletions

View File

@ -22,7 +22,7 @@ impl DisplayLogs {
// Even when the rest of the UI is ripped out, retain this static state.
let mut lock = LOGGER_STARTED.lock().unwrap();
if !*lock {
log::set_max_level(LevelFilter::Debug);
log::set_max_level(LevelFilter::Info);
log::set_logger(&LOG_ADAPTER).unwrap();
*lock = true;
}

View File

@ -33,7 +33,7 @@ struct Flags {
fn main() {
let flags = Flags::from_args();
log::set_max_level(LevelFilter::Debug);
log::set_max_level(LevelFilter::Info);
log::set_logger(&LOG_ADAPTER).unwrap();
// TODO not the ideal way to distinguish what thing we loaded

View File

@ -1,5 +1,6 @@
// Call the log crate, but pre-set the target.
/*
macro_rules! debug {
( $( $x:expr ),* ) => {
{
@ -8,6 +9,7 @@ macro_rules! debug {
}
}
}
*/
macro_rules! info {
( $( $x:expr ),* ) => {

View File

@ -66,7 +66,7 @@ pub fn make_bus_stops(
.map(|stop| *stop)
.collect();
if stops.len() == 1 {
debug!(
warn!(
"Skipping route {} since it only has 1 stop in the slice of the map",
route_name
);
@ -95,7 +95,7 @@ pub fn verify_bus_routes(map: &Map, routes: Vec<BusRoute>) -> Vec<BusRoute> {
let bs2 = map.get_bs(*stop2);
if Pathfinder::shortest_distance(map, bs1.driving_lane, bs2.driving_lane).is_none()
{
debug!(
warn!(
"Removing route {} since {:?} and {:?} aren't connected",
r.name, bs1, bs2
);

View File

@ -1,3 +1,3 @@
#!/bin/bash
grep -R --exclude-dir=.git --exclude-dir=target --exclude-dir=data --exclude=Cargo.lock --color=always "$@"
grep -R --exclude-dir=.git --exclude-dir=target --exclude-dir=data --exclude=Cargo.lock --color=auto "$@"