mirror of
https://github.com/hannobraun/Fornjot
synced 2025-06-26 13:16:11 +00:00
Set up logging in handle_model
This commit is contained in:
parent
25bed50fcc
commit
4b2a75a17f
@ -11,6 +11,7 @@ use fj_core::{
|
|||||||
};
|
};
|
||||||
use fj_interop::model::Model;
|
use fj_interop::model::Model;
|
||||||
use fj_math::{Aabb, Point, Scalar};
|
use fj_math::{Aabb, Point, Scalar};
|
||||||
|
use tracing_subscriber::prelude::*;
|
||||||
|
|
||||||
use crate::Args;
|
use crate::Args;
|
||||||
|
|
||||||
@ -30,6 +31,11 @@ where
|
|||||||
for<'r> (&'r M, Tolerance): Triangulate,
|
for<'r> (&'r M, Tolerance): Triangulate,
|
||||||
M: BoundingVolume<3>,
|
M: BoundingVolume<3>,
|
||||||
{
|
{
|
||||||
|
tracing_subscriber::registry()
|
||||||
|
.with(tracing_subscriber::fmt::layer())
|
||||||
|
.with(tracing_subscriber::EnvFilter::from_default_env())
|
||||||
|
.init();
|
||||||
|
|
||||||
let args = Args::parse();
|
let args = Args::parse();
|
||||||
|
|
||||||
if args.ignore_validation {
|
if args.ignore_validation {
|
||||||
@ -82,6 +88,10 @@ pub type Result = std::result::Result<(), Error>;
|
|||||||
/// Error returned by [`handle_model`]
|
/// Error returned by [`handle_model`]
|
||||||
#[derive(thiserror::Error)]
|
#[derive(thiserror::Error)]
|
||||||
pub enum Error {
|
pub enum Error {
|
||||||
|
/// Failed to set up logger
|
||||||
|
#[error("Failed to set up logger")]
|
||||||
|
Tracing(#[from] tracing::subscriber::SetGlobalDefaultError),
|
||||||
|
|
||||||
/// Error displaying model
|
/// Error displaying model
|
||||||
#[error("Error displaying model")]
|
#[error("Error displaying model")]
|
||||||
Display(#[from] crate::window::Error),
|
Display(#[from] crate::window::Error),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user