Fix the debug config feature and --debug flag.

This commit is contained in:
Nick Lewycky
2020-08-03 17:39:16 -07:00
parent dcdebaffdd
commit e942410ef5
4 changed files with 11 additions and 2 deletions

View File

@@ -1,4 +1,5 @@
use crate::common::get_cache_dir;
use crate::logging;
use crate::store::{CompilerType, EngineType, StoreOptions};
use crate::suggestions::suggest_function_exports;
use crate::warning;
@@ -70,6 +71,10 @@ pub struct Run {
impl Run {
/// Execute the run command
pub fn execute(&self) -> Result<()> {
#[cfg(feature = "debug")]
if self.debug {
logging::set_up_logging().unwrap();
}
self.inner_execute().with_context(|| {
let compilers = CompilerType::enabled()
.iter()

View File

@@ -1,3 +1,4 @@
//! Logging functions for the debug feature.
use crate::utils::wasmer_should_print_color;
use fern::colors::{Color, ColoredLevelConfig};
use std::time;