mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-11-28 03:35:51 +03:00
adjusting logging to not include debug by default
This commit is contained in:
parent
da550910c7
commit
661d784b6e
@ -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;
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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 ),* ) => {
|
||||
|
@ -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
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user