We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 334de49 + 31a4dee commit 6286262Copy full SHA for 6286262
1 file changed
src/main/core/main.rs
@@ -243,14 +243,18 @@ mod export {
243
244
if let Err(e) = result {
245
// log the full error, its context, and its backtrace if enabled
246
- for line in format!("{:?}", e).split("\n") {
247
- log::error!("{}", line);
+ if log::log_enabled!(log::Level::Error) {
+ for line in format!("{:?}", e).split("\n") {
248
+ log::error!("{}", line);
249
+ }
250
+ log::logger().flush();
251
+
252
+ // print the short error
253
+ eprintln!("** Shadow did not complete successfully: {}", e);
254
+ eprintln!("** See the log for details");
255
+ } else {
256
+ eprintln!("{:?}", e);
257
}
- log::logger().flush();
-
- // print the short error
- eprintln!("** Shadow did not complete successfully: {}", e);
- eprintln!("** See the log for details");
258
259
return 1;
260
0 commit comments