Use tracing for configurable logging

This commit is contained in:
Matthias Schiffer 2023-09-19 23:29:05 +02:00
parent e57ec81d96
commit a8eb2da95d
Signed by: neocturne
GPG key ID: 16EF3F64CB201D9C
7 changed files with 164 additions and 11 deletions

View file

@ -7,6 +7,7 @@ use std::fmt::Debug;
use anyhow::{bail, Context, Result};
use num_integer::div_rem;
use tracing::warn;
use super::de;
use crate::{
@ -94,7 +95,7 @@ impl<'a> SectionV1_13<'a> {
.map(|entry| {
let block_type = block_types.get(&entry.name);
if block_type.is_none() {
eprintln!("Unknown block type: {}", entry.name);
warn!("Unknown block type: {}", entry.name);
}
block_type
})
@ -246,7 +247,7 @@ impl<'a> BiomesV1_18<'a> {
.map(|entry| {
let biome_type = biome_types.get(entry);
if biome_type.is_none() {
eprintln!("Unknown biome type: {}", entry);
warn!("Unknown biome type: {}", entry);
}
biome_type
})