main.rs: documentation update

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
This commit is contained in:
2020-06-12 22:28:16 +02:00
parent 6778746116
commit dedd4b49e3

View File

@@ -1,6 +1,6 @@
/* advotracker infrastructure.
*
* Copyright 2019 Ralf Zerres <ralf.zerres@networkx.de>
* Copyright 2020 Ralf Zerres <ralf.zerres@networkx.de>
* SPDX-License-Identifier: (0BSD or MIT)
*/
@@ -8,6 +8,8 @@
//#![feature(proc_macro)]
//#![deny(rust_2018_idioms)]
/// advotrackerd: the main binary
//use log::info; //substituted with tracing
use dotenv::dotenv;
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>> {
use parse_args::parse_args;
use tracing_subscriber::fmt;
@@ -86,6 +90,8 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
// .expect("setting tracing default failed");
// 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 _enter = span.enter();
let subscriber = fmt::Subscriber::builder()