diff options
| author | Fuwn <[email protected]> | 2021-05-15 16:05:52 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2021-05-15 16:05:52 -0700 |
| commit | ec4c3643e09dbe0010c7bbf64325e11c0f915bca (patch) | |
| tree | 1931e3486468b1ff31b38af80157cfa08cfe4764 | |
| parent | chore(git): normilize eol to lf (diff) | |
| download | whirl-ec4c3643e09dbe0010c7bbf64325e11c0f915bca.tar.xz whirl-ec4c3643e09dbe0010c7bbf64325e11c0f915bca.zip | |
feat(global): logs now go to a dedicated directory and file
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | Cargo.toml | 2 | ||||
| -rw-r--r-- | src/main.rs | 6 |
3 files changed, 7 insertions, 2 deletions
@@ -18,6 +18,7 @@ Cargo.lock /whirl.sqlite3 /Whirl.toml /.secrets +/log/ # DB Browser /whirl.sqlite3-shm @@ -21,7 +21,7 @@ dotenv = "0.15.0" # Logging log = "0.4.14" -pretty_env_logger = "0.4.0" +flexi_logger = "0.17.1" # Utility rand = "0.8.3" diff --git a/src/main.rs b/src/main.rs index 2171243..0b3899d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -12,7 +12,11 @@ async fn main() -> Result<(), Box<dyn Error>> { // Logging dotenv::dotenv().ok(); - pretty_env_logger::init(); + flexi_logger::Logger::with_str("trace") + .log_to_file() + .directory("log") + .print_message() + .start()?; // Execution Cli::execute(matches).await; |