Remove outdated slog logging.

This commit is contained in:
Richard Newman 2017-05-03 11:27:19 -07:00
parent daca8def57
commit f4b8e76ae0
3 changed files with 0 additions and 34 deletions

View file

@ -21,9 +21,6 @@ chrono = "0.3"
clap = "2.19.3" clap = "2.19.3"
error-chain = "0.8.1" error-chain = "0.8.1"
nickel = "0.9.0" nickel = "0.9.0"
slog = "1.4.0"
slog-scope = "0.2.2"
slog-term = "1.3.4"
time = "0.1.35" time = "0.1.35"
[dependencies.rusqlite] [dependencies.rusqlite]

View file

@ -11,12 +11,6 @@
#[macro_use] #[macro_use]
extern crate error_chain; extern crate error_chain;
#[macro_use]
extern crate slog;
#[macro_use]
extern crate slog_scope;
extern crate rusqlite; extern crate rusqlite;
extern crate edn; extern crate edn;
@ -38,7 +32,6 @@ pub mod conn;
pub mod query; pub mod query;
pub fn get_name() -> String { pub fn get_name() -> String {
info!("Called into mentat library"; "fn" => "get_name");
return String::from("mentat"); return String::from("mentat");
} }

View file

@ -13,16 +13,9 @@ extern crate clap;
use nickel::{Nickel, HttpRouter}; use nickel::{Nickel, HttpRouter};
#[macro_use]
extern crate slog;
#[macro_use]
extern crate slog_scope;
extern crate slog_term;
extern crate mentat; extern crate mentat;
use clap::{App, Arg, SubCommand, AppSettings}; use clap::{App, Arg, SubCommand, AppSettings};
use slog::DrainExt;
use std::u16; use std::u16;
use std::str::FromStr; use std::str::FromStr;
@ -59,23 +52,6 @@ fn main() {
matches.value_of("port").unwrap()); 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(); let mut server = Nickel::new();
server.get("/", middleware!("This doesn't do anything yet")); server.get("/", middleware!("This doesn't do anything yet"));
server.listen(("127.0.0.1", port)).expect("Failed to launch server"); server.listen(("127.0.0.1", port)).expect("Failed to launch server");