-
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.
* Update README.md * added custom log render * added log an requirement checks * fixed panic if get_last was called while no spinner was created
- Loading branch information
Showing
14 changed files
with
567 additions
and
38 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
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
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,42 @@ | ||
use log::Level; | ||
|
||
use zenity::log::Logger; | ||
|
||
mod foo { | ||
mod bar { | ||
pub fn run() { | ||
log::error!("[bar] error"); | ||
log::warn!("[bar] warn"); | ||
log::info!("[bar] info"); | ||
log::debug!("[bar] debug"); | ||
log::trace!("[bar] trace"); | ||
} | ||
} | ||
|
||
pub fn run() { | ||
log::error!("[foo] error"); | ||
log::warn!("[foo] warn"); | ||
log::info!("[foo] info"); | ||
log::debug!("[foo] debug"); | ||
log::trace!("[foo] trace"); | ||
bar::run(); | ||
} | ||
} | ||
|
||
fn main() { | ||
// Set the custom logger as the global logger | ||
Logger::new() | ||
.with_env("TEST_LEVEL") | ||
.with_arg() | ||
.set_log_level(Level::Trace) | ||
.init() | ||
.unwrap(); | ||
|
||
// Now you can use log::debug! to output messages | ||
log::error!("[root] This is a error message"); | ||
log::warn!("[root] This is a warn message"); | ||
log::info!("[root] This is a info message"); | ||
log::debug!("[root] This is a debug message"); | ||
log::trace!("[root] This is a trace message"); | ||
foo::run(); | ||
} |
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,8 @@ | ||
use zenity::menu::requirements; | ||
|
||
fn main() { | ||
match requirements::verify_requirements(vec!["uidmap", "bridge-utils"]) { | ||
Ok(_) => println!("All required packages are installed."), | ||
Err(err) => eprintln!("Error verifying requirements: {}", err), | ||
} | ||
} |
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
Oops, something went wrong.