Remove outdated slog logging.
This commit is contained in:
parent
daca8def57
commit
f4b8e76ae0
3 changed files with 0 additions and 34 deletions
|
@ -21,9 +21,6 @@ chrono = "0.3"
|
|||
clap = "2.19.3"
|
||||
error-chain = "0.8.1"
|
||||
nickel = "0.9.0"
|
||||
slog = "1.4.0"
|
||||
slog-scope = "0.2.2"
|
||||
slog-term = "1.3.4"
|
||||
time = "0.1.35"
|
||||
|
||||
[dependencies.rusqlite]
|
||||
|
|
|
@ -11,12 +11,6 @@
|
|||
#[macro_use]
|
||||
extern crate error_chain;
|
||||
|
||||
#[macro_use]
|
||||
extern crate slog;
|
||||
|
||||
#[macro_use]
|
||||
extern crate slog_scope;
|
||||
|
||||
extern crate rusqlite;
|
||||
|
||||
extern crate edn;
|
||||
|
@ -38,7 +32,6 @@ pub mod conn;
|
|||
pub mod query;
|
||||
|
||||
pub fn get_name() -> String {
|
||||
info!("Called into mentat library"; "fn" => "get_name");
|
||||
return String::from("mentat");
|
||||
}
|
||||
|
||||
|
|
24
src/main.rs
24
src/main.rs
|
@ -13,16 +13,9 @@ extern crate clap;
|
|||
|
||||
use nickel::{Nickel, HttpRouter};
|
||||
|
||||
#[macro_use]
|
||||
extern crate slog;
|
||||
#[macro_use]
|
||||
extern crate slog_scope;
|
||||
extern crate slog_term;
|
||||
|
||||
extern crate mentat;
|
||||
|
||||
use clap::{App, Arg, SubCommand, AppSettings};
|
||||
use slog::DrainExt;
|
||||
|
||||
use std::u16;
|
||||
use std::str::FromStr;
|
||||
|
@ -59,23 +52,6 @@ fn main() {
|
|||
matches.value_of("port").unwrap());
|
||||
}
|
||||
|
||||
// Set up logging.
|
||||
let log_level = if debug {
|
||||
slog::Level::Debug
|
||||
} else {
|
||||
slog::Level::Warning
|
||||
};
|
||||
let term_logger = slog_term::streamer().build().fuse();
|
||||
let log = slog::Logger::root(slog::LevelFilter::new(term_logger, log_level),
|
||||
o!("version" => env!("CARGO_PKG_VERSION")));
|
||||
slog_scope::set_global_logger(log);
|
||||
|
||||
info!("Serving database"; "database" => matches.value_of("database").unwrap(),
|
||||
"port" => port,
|
||||
"debug mode" => debug);
|
||||
|
||||
error!("Calling a function: {}", mentat::get_name());
|
||||
|
||||
let mut server = Nickel::new();
|
||||
server.get("/", middleware!("This doesn't do anything yet"));
|
||||
server.listen(("127.0.0.1", port)).expect("Failed to launch server");
|
||||
|
|
Loading…
Reference in a new issue