mirror of
https://github.com/CompeyDev/lune-packaging.git
synced 2025-01-09 12:19:09 +00:00
feat: conditional scoping based on actions debug mode
This commit is contained in:
parent
891312c0a6
commit
f0eed2fd01
1 changed files with 5 additions and 2 deletions
|
@ -1,6 +1,7 @@
|
||||||
use std::fs::File;
|
use std::fs::File;
|
||||||
|
|
||||||
use action::download::{download_release, install_lune};
|
use action::download::{download_release, install_lune};
|
||||||
|
use actions_core as core;
|
||||||
use tracing::Level;
|
use tracing::Level;
|
||||||
use tracing_unwrap::ResultExt;
|
use tracing_unwrap::ResultExt;
|
||||||
|
|
||||||
|
@ -8,9 +9,11 @@ fn main() {
|
||||||
if cfg!(debug_assertions) {
|
if cfg!(debug_assertions) {
|
||||||
better_panic::install();
|
better_panic::install();
|
||||||
} else {
|
} else {
|
||||||
// Check for is_debug in github actions
|
|
||||||
tracing_subscriber::fmt()
|
tracing_subscriber::fmt()
|
||||||
.with_max_level(Level::DEBUG)
|
.with_max_level(match core::is_debug() {
|
||||||
|
true => Level::DEBUG,
|
||||||
|
false => Level::ERROR,
|
||||||
|
})
|
||||||
.init();
|
.init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue