main.rs: documentation update
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
/* advotracker infrastructure.
|
/* advotracker infrastructure.
|
||||||
*
|
*
|
||||||
* Copyright 2019 Ralf Zerres <ralf.zerres@networkx.de>
|
* Copyright 2020 Ralf Zerres <ralf.zerres@networkx.de>
|
||||||
* SPDX-License-Identifier: (0BSD or MIT)
|
* SPDX-License-Identifier: (0BSD or MIT)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -8,6 +8,8 @@
|
|||||||
//#![feature(proc_macro)]
|
//#![feature(proc_macro)]
|
||||||
//#![deny(rust_2018_idioms)]
|
//#![deny(rust_2018_idioms)]
|
||||||
|
|
||||||
|
/// advotrackerd: the main binary
|
||||||
|
|
||||||
//use log::info; //substituted with tracing
|
//use log::info; //substituted with tracing
|
||||||
use dotenv::dotenv;
|
use dotenv::dotenv;
|
||||||
use locales::t;
|
use locales::t;
|
||||||
@@ -76,6 +78,8 @@ fn run_test(matches: &ArgMatches) -> Result<(), String> {
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/// `advotrackerd` is the daemon that keeps track of legal mandate data
|
||||||
|
/// that are backed up in a database.
|
||||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||||
use parse_args::parse_args;
|
use parse_args::parse_args;
|
||||||
use tracing_subscriber::fmt;
|
use tracing_subscriber::fmt;
|
||||||
@@ -86,6 +90,8 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||||||
// .expect("setting tracing default failed");
|
// .expect("setting tracing default failed");
|
||||||
|
|
||||||
// initialize the tracing subsystem
|
// initialize the tracing subsystem
|
||||||
|
// a drop in replacement for classical logging
|
||||||
|
// reference: https://tokio.rs/blog/2019-08-tracing/
|
||||||
let span = tracing::span!(Level::TRACE, "advotracker_main");
|
let span = tracing::span!(Level::TRACE, "advotracker_main");
|
||||||
let _enter = span.enter();
|
let _enter = span.enter();
|
||||||
let subscriber = fmt::Subscriber::builder()
|
let subscriber = fmt::Subscriber::builder()
|
||||||
|
|||||||
Reference in New Issue
Block a user