frontend: example: csv-import helper update

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
This commit is contained in:
2020-06-26 23:25:34 +02:00
parent 6a7d9a39d1
commit 9e65ef198a
2 changed files with 6 additions and 3 deletions

View File

@@ -49,13 +49,16 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
use tracing_subscriber::fmt;
use viperus::Viperus;
//static DEFAULT_FILTER: &str = concat!(module_path!(), "=", "trace");
// 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, "csv-import");
let _enter = span.enter();
let subscriber = fmt::Subscriber::builder()
.with_env_filter("csv-import=trace")
.with_env_filter("trace")
//.with_max_level(tracing::Level::DEBUG)
.finish();
// initialize logger

View File

@@ -4,7 +4,7 @@ use viperus::Viperus;
/// processed default, environment and commandline arguments
pub fn parse_args(v: &mut Viperus) -> Result<(), Box<dyn std::error::Error>> {
//use log::{debug, info, trace, warn};
use log::trace;
use tracing::{trace, Level};
use std::env;
if cfg!(feature = "fmt-clap") {
@@ -23,7 +23,7 @@ pub fn parse_args(v: &mut Viperus) -> Result<(), Box<dyn std::error::Error>> {
use clap::{crate_authors, crate_description, crate_name, crate_version, App, Arg};
// CLI arguments are defined inline
let matches = App::new("nctalkproxyd")
let matches = App::new("csv-import")
.name(crate_name!())
.version(crate_version!())
.author(crate_authors!())