mirror of
https://github.com/Zenithsiz/ndsz.git
synced 2026-02-04 02:08:42 +00:00
Now using tracing instead of log.
This commit is contained in:
parent
c442328ae5
commit
3ec470087d
@ -18,7 +18,7 @@ zutil = {git = "https://github.com/Zenithsiz/zutil", rev = "2a029369ac5aa4e7dbd6
|
||||
thiserror = "1.0.32"
|
||||
|
||||
# Logging
|
||||
log = "0.4.17"
|
||||
tracing = "0.1.36"
|
||||
|
||||
# Serde
|
||||
serde = {version = "1.0.143", features = ["derive"]}
|
||||
|
||||
@ -17,7 +17,7 @@ zutil = {git = "https://github.com/Zenithsiz/zutil", rev = "2a029369ac5aa4e7dbd6
|
||||
thiserror = "1.0.32"
|
||||
|
||||
# Logging
|
||||
log = "0.4.17"
|
||||
tracing = "0.1.36"
|
||||
|
||||
# Serde
|
||||
serde = {version = "1.0.143", features = ["derive"]}
|
||||
|
||||
@ -21,7 +21,7 @@ zutil = {git = "https://github.com/Zenithsiz/zutil", rev = "2a029369ac5aa4e7dbd6
|
||||
thiserror = "1.0.32"
|
||||
|
||||
# Logging
|
||||
log = "0.4.17"
|
||||
tracing = "0.1.36"
|
||||
|
||||
# Serde
|
||||
serde = {version = "1.0.143", features = ["derive"]}
|
||||
|
||||
@ -17,7 +17,7 @@ zutil = {git = "https://github.com/Zenithsiz/zutil", rev = "2a029369ac5aa4e7dbd6
|
||||
thiserror = "1.0.28"
|
||||
|
||||
# Logging
|
||||
log = "0.4.14"
|
||||
tracing = "0.1.36"
|
||||
|
||||
# Serde
|
||||
serde = {version = "1.0.130", features = ["derive"]}
|
||||
|
||||
@ -21,8 +21,8 @@ zutil = {git = "https://github.com/Zenithsiz/zutil", rev = "2a029369ac5aa4e7dbd6
|
||||
anyhow = "1.0.62"
|
||||
|
||||
# Logging
|
||||
log = "0.4.17"
|
||||
simplelog = "0.12.0"
|
||||
tracing = "0.1.36"
|
||||
tracing-subscriber = {version = "0.3.15", features = ["env-filter"]}
|
||||
|
||||
# Serde
|
||||
serde_yaml = "0.9.9"
|
||||
|
||||
@ -13,18 +13,15 @@ use clap::Parser;
|
||||
use ndsz_fat::{dir, Dir, FileAllocationTable};
|
||||
use ndsz_narc::Narc;
|
||||
use std::{fs, io, path::PathBuf};
|
||||
use tracing_subscriber::prelude::*;
|
||||
use zutil::{AsciiStrArr, IoSlice};
|
||||
|
||||
|
||||
fn main() -> Result<(), anyhow::Error> {
|
||||
// Initialize the logger
|
||||
simplelog::TermLogger::init(
|
||||
log::LevelFilter::Debug,
|
||||
simplelog::Config::default(),
|
||||
simplelog::TerminalMode::Stderr,
|
||||
simplelog::ColorChoice::Auto,
|
||||
)
|
||||
.context("Unable to initialize logger")?;
|
||||
tracing_subscriber::registry()
|
||||
.with(tracing_subscriber::fmt::layer().with_filter(tracing_subscriber::EnvFilter::from_default_env()))
|
||||
.init();
|
||||
|
||||
// Get the arguments
|
||||
let args = Args::parse();
|
||||
|
||||
@ -21,8 +21,8 @@ zutil = {git = "https://github.com/Zenithsiz/zutil", rev = "2a029369ac5aa4e7dbd6
|
||||
anyhow = "1.0.62"
|
||||
|
||||
# Logging
|
||||
log = "0.4.17"
|
||||
simplelog = "0.12.0"
|
||||
tracing = "0.1.36"
|
||||
tracing-subscriber = {version = "0.3.15", features = ["env-filter"]}
|
||||
|
||||
# Serde
|
||||
serde_yaml = "0.9.9"
|
||||
|
||||
@ -15,18 +15,15 @@ use std::{
|
||||
fs, io,
|
||||
path::{Path, PathBuf},
|
||||
};
|
||||
use tracing_subscriber::prelude::*;
|
||||
use zutil::{AsciiStrArr, IoSlice, ReadByteArray};
|
||||
|
||||
|
||||
fn main() -> Result<(), anyhow::Error> {
|
||||
// Initialize the logger
|
||||
simplelog::TermLogger::init(
|
||||
log::LevelFilter::Debug,
|
||||
simplelog::Config::default(),
|
||||
simplelog::TerminalMode::Stderr,
|
||||
simplelog::ColorChoice::Auto,
|
||||
)
|
||||
.context("Unable to initialize logger")?;
|
||||
tracing_subscriber::registry()
|
||||
.with(tracing_subscriber::fmt::layer().with_filter(tracing_subscriber::EnvFilter::from_default_env()))
|
||||
.init();
|
||||
|
||||
// Get the arguments
|
||||
let args = Args::parse();
|
||||
@ -39,8 +36,7 @@ fn main() -> Result<(), anyhow::Error> {
|
||||
let header_bytes = input_file.read_byte_array().context("Unable to read header")?;
|
||||
ndsz_nds::Header::from_bytes(&header_bytes).context("Unable to parse header")?
|
||||
};
|
||||
|
||||
log::info!("Found header {header:#?}");
|
||||
tracing::trace!(?header);
|
||||
|
||||
// Get the fat
|
||||
let fat = {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user