Use log::error! instead of log::warn! for the tessellate_sat diagnostics
The web build's logger (sys.rs's BannerLogger) installs log::set_max_level(LevelFilter::Error) - warn! records never reach it (or even the browser console) at all, they're filtered at the macro call site. error! also gets a free on-page banner via show_banner(), not just a console line - the more useful behavior for a user hitting this without DevTools open.
This commit is contained in:
parent
6bfdd6c31d
commit
5dace5449d
1 changed files with 5 additions and 5 deletions
|
|
@ -29,7 +29,7 @@ pub fn tessellate_sat(
|
|||
let (bodies, loss) = lift(document);
|
||||
let body_count = bodies.len();
|
||||
if bodies.is_empty() {
|
||||
log::warn!(
|
||||
log::error!(
|
||||
"tessellate_sat({name}): lift() returned zero bodies - {} unsupported surface(s), {} unsupported curve(s), {} broken/malformed pointer(s) - nothing to draw",
|
||||
loss.surfaces.len(),
|
||||
loss.curves.len(),
|
||||
|
|
@ -49,7 +49,7 @@ pub fn tessellate_sat(
|
|||
let mut placed_bodies = Vec::with_capacity(body_count);
|
||||
for (index, body) in bodies.into_iter().enumerate() {
|
||||
let Some(source) = body.provenance.source() else {
|
||||
log::warn!(
|
||||
log::error!(
|
||||
"tessellate_sat({name}): body {index}/{body_count} has no provenance source - aborting the whole document instead of just this body"
|
||||
);
|
||||
return None;
|
||||
|
|
@ -57,7 +57,7 @@ pub fn tessellate_sat(
|
|||
let transform = match body_transform(document, source.index() as usize) {
|
||||
Ok(t) => t,
|
||||
Err(err) => {
|
||||
log::warn!(
|
||||
log::error!(
|
||||
"tessellate_sat({name}): body {index}/{body_count} (source record {}) has no resolvable transform: {err:?} - aborting the whole document",
|
||||
source.index()
|
||||
);
|
||||
|
|
@ -73,7 +73,7 @@ pub fn tessellate_sat(
|
|||
origin: translation,
|
||||
};
|
||||
let Some(placed) = brep::transform(&body, &placement) else {
|
||||
log::warn!(
|
||||
log::error!(
|
||||
"tessellate_sat({name}): body {index}/{body_count} failed brep::transform() - aborting the whole document"
|
||||
);
|
||||
return None;
|
||||
|
|
@ -196,7 +196,7 @@ pub fn tessellate_sat(
|
|||
}
|
||||
}
|
||||
if indices.is_empty() {
|
||||
log::warn!(
|
||||
log::error!(
|
||||
"tessellate_sat({name}): {body_count} placed bodies produced zero triangles ({undrawn} face(s) undrawn) - every face was either missing or unrepresentable in its surface's own parameters"
|
||||
);
|
||||
return None;
|
||||
|
|
|
|||
Loading…
Reference in a new issue