Use log / stderrlog

This commit is contained in:
2018-11-28 16:55:56 +01:00
parent e040ef14ff
commit bb6bc07906
6 changed files with 37 additions and 23 deletions
+6 -6
View File
@@ -145,7 +145,7 @@ impl Model {
for (name, material) in &other.materials {
let entry = self.materials.entry(name.clone());
if let Entry::Occupied(_) = entry {
eprintln!("Warning: materials merged but sharing the same name");
warn!("Materials merged but sharing the same name");
// Return error
} else {
entry.or_insert(material.clone());
@@ -156,7 +156,7 @@ impl Model {
for (name, texture) in &other.textures {
let entry = self.textures.entry(name.clone());
if let Entry::Occupied(_) = entry {
eprintln!("Warning: textures merged but sharing the same name");
warn!("Textures merged but sharing the same name");
// return Error;
} else {
entry.or_insert(texture.clone());
@@ -172,7 +172,7 @@ impl Model {
for (name, material) in other.materials {
let entry = self.materials.entry(name);
if let Entry::Occupied(_) = entry {
eprintln!("Warning: materials merged but sharing the same name");
warn!("Materials merged but sharing the same name");
// Return error
} else {
entry.or_insert(material);
@@ -183,7 +183,7 @@ impl Model {
for (name, texture) in other.textures {
let entry = self.textures.entry(name);
if let Entry::Occupied(_) = entry {
eprintln!("Warning: textures merged but sharing the same name");
warn!("Textures merged but sharing the same name");
// return Error;
} else {
entry.or_insert(texture);
@@ -235,7 +235,7 @@ impl Model {
for (name, material) in other.materials {
let entry = self.materials.entry(name);
if let Entry::Occupied(_) = entry {
eprintln!("Warning: materials merged but sharing the same name");
warn!("Materials merged but sharing the same name");
// Return error
} else {
entry.or_insert(material);
@@ -246,7 +246,7 @@ impl Model {
for (name, texture) in other.textures {
let entry = self.textures.entry(name);
if let Entry::Occupied(_) = entry {
eprintln!("Warning: textures merged but sharing the same name");
warn!("Textures merged but sharing the same name");
// return Error;
} else {
entry.or_insert(texture);