make log_timestamp actually do something
This commit is contained in:
parent
207a5b8917
commit
7b5816bed7
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -1143,7 +1143,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "homekit-exporter"
|
||||
version = "0.5.3"
|
||||
version = "0.5.4"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"env_logger",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "homekit-exporter"
|
||||
version = "0.5.3"
|
||||
version = "0.5.4"
|
||||
edition = "2021"
|
||||
license = "Apache-2.0"
|
||||
description = "Prometheus exporter for HomeKit sensors"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Maintainer: Alex Janka <alex@alexjanka.com>
|
||||
|
||||
pkgname=homekit-logger
|
||||
pkgver=0.5.3
|
||||
pkgver=0.5.4
|
||||
pkgrel=1
|
||||
pkgdesc="Prometheus exporter for HomeKit sensors"
|
||||
arch=('x86_64' 'aarch64')
|
||||
|
|
|
@ -44,7 +44,16 @@ const MONITORED_CHARACTERISTICS: [CharacteristicType; 7] = [
|
|||
|
||||
#[launch]
|
||||
async fn rocket() -> rocket::Rocket<rocket::Build> {
|
||||
env_logger::init();
|
||||
env_logger::builder()
|
||||
.format_module_path(false)
|
||||
.format_timestamp(
|
||||
if std::env::var("LOG_TIMESTAMP").is_ok_and(|v| v == "false") {
|
||||
None
|
||||
} else {
|
||||
Some(env_logger::TimestampPrecision::Seconds)
|
||||
},
|
||||
)
|
||||
.init();
|
||||
let args = Args::parse();
|
||||
|
||||
match args.command {
|
||||
|
|
Loading…
Reference in a new issue