change warn to debug
This commit is contained in:
parent
593e397b03
commit
d2cd4f2251
2 changed files with 4 additions and 3 deletions
|
|
@ -37,7 +37,6 @@ async fn main() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// todo: support journald once this issue is resolved: https://github.com/tokio-rs/tracing/issues/2348
|
|
||||||
fn init_logging(cmd: &str) {
|
fn init_logging(cmd: &str) {
|
||||||
use tracing_subscriber::{fmt, layer::SubscriberExt, util::SubscriberInitExt, EnvFilter};
|
use tracing_subscriber::{fmt, layer::SubscriberExt, util::SubscriberInitExt, EnvFilter};
|
||||||
|
|
||||||
|
|
@ -57,7 +56,7 @@ fn init_logging(cmd: &str) {
|
||||||
|
|
||||||
if let Ok(file) = logfile {
|
if let Ok(file) = logfile {
|
||||||
if let Ok(meta) = file.metadata() {
|
if let Ok(meta) = file.metadata() {
|
||||||
if meta.len() > 10000 {
|
if meta.len() > 1000 {
|
||||||
let _ = file.set_len(0);
|
let _ = file.set_len(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -68,6 +67,8 @@ fn init_logging(cmd: &str) {
|
||||||
|
|
||||||
let fmt_layer = fmt::layer().with_target(false).with_writer(file);
|
let fmt_layer = fmt::layer().with_target(false).with_writer(file);
|
||||||
|
|
||||||
|
// would be nice to implement this tracing issue
|
||||||
|
// for journald https://github.com/tokio-rs/tracing/issues/2348
|
||||||
if let Ok(journal_layer) = tracing_journald::layer() {
|
if let Ok(journal_layer) = tracing_journald::layer() {
|
||||||
tracing_subscriber::registry()
|
tracing_subscriber::registry()
|
||||||
.with(journal_layer)
|
.with(journal_layer)
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,7 @@ pub async fn main() {
|
||||||
|
|
||||||
if let Some(pos) = app.toplevels.iter().position(|t| t.0 == handle) {
|
if let Some(pos) = app.toplevels.iter().position(|t| t.0 == handle) {
|
||||||
if info.state.contains(&State::Activated) {
|
if info.state.contains(&State::Activated) {
|
||||||
tracing::warn!("Update {:?}: push front", &info.app_id);
|
tracing::debug!("Update {:?}: push front", &info.app_id);
|
||||||
app.toplevels.remove(pos);
|
app.toplevels.remove(pos);
|
||||||
app.toplevels.push_front((handle, info));
|
app.toplevels.push_front((handle, info));
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue