Skip to content

Commit

Permalink
build: add some logs examples
Browse files Browse the repository at this point in the history
  • Loading branch information
phodal committed Dec 6, 2021
1 parent 69e55d6 commit f930c0c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/cli_action/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ pub fn action(expr: QuakeAction, conf: QuakeConfig) -> Result<(), Box<dyn Error>
match expr.object.as_str() {
"quake" => quake_action::quake_action(expr.action, &conf),
"flow" => transflow_action::transflow_action(expr.action, &conf),
"transflow" => Ok(()),
_ => entry_action::entry_action(&expr, conf),
}
}
8 changes: 5 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use std::path::PathBuf;
use clap::Parser;
use futures::future;
use helper::entry_watcher;
use tracing::error;
use tracing::{debug, error};

use quake_core::entry::entry_defines::EntryDefines;
use quake_core::parser::quake::QuakeAction;
Expand Down Expand Up @@ -143,7 +143,8 @@ fn init_projects(config: Init) -> Result<(), Box<dyn Error>> {
server_location: "web".to_string(),
};

fs::write(path, serde_yaml::to_string(&config)?)?;
fs::write(&path, serde_yaml::to_string(&config)?)?;
debug!("create .quake.yaml in {:?}", &path.display());

let todo_define = "
- type: todo
Expand All @@ -157,7 +158,8 @@ fn init_projects(config: Init) -> Result<(), Box<dyn Error>> {
entries: serde_yaml::from_str(todo_define).unwrap(),
};

fs::write(define, serde_yaml::to_string(&file)?)?;
fs::write(&define, serde_yaml::to_string(&file)?)?;
debug!("create default entry defines in {:?}", &define.display());

Ok(())
}
Expand Down

0 comments on commit f930c0c

Please sign in to comment.