-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Logger module for logging functionality
- Loading branch information
1 parent
4e2f24a
commit 66b7b14
Showing
3 changed files
with
32 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
use owo_colors::OwoColorize; | ||
|
||
pub struct Logger {} | ||
|
||
impl Logger { | ||
pub fn new() -> Self { | ||
Logger {} | ||
} | ||
|
||
pub fn info(&self, message: &str) { | ||
println!("- {}", message.blue().bold()); | ||
} | ||
|
||
pub fn activity(&self, message: &str) { | ||
println!("\n- {}...", message.bold()); | ||
} | ||
|
||
pub fn error(&self, message: &str) { | ||
println!("- Error: {}", message.to_string().red().bold()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
pub mod logger; | ||
pub mod settings; | ||
pub mod utils; |