use crate::attribute::AttributeView;
pub fn log_attribute(path: &str, attribute: &AttributeView) {
if !log::log_enabled!(log::Level::Info) {
return;
}
match serde_json::to_string(attribute) {
Ok(json) => log::info!("{path} | {json}"),
Err(e) => log::warn!("{path} | could not serialize attribute: {e}"),
}
}