A mobile app for listening to radio stations from around the globe
git clone git://soophie.de/verbal
blob: 3be19518260c925ddcb06315aa2a3d7a23b0721a (751 bytes)[doc][blame][raw]
1
use env_logger::Builder;2
use env_logger::Target;3
use log::LevelFilter;4
use std::process;6
pub mod error;7
pub mod middleware;8
pub mod model;9
pub mod route;10
pub mod utils;12
mod config;13
mod response;14
mod server;16
pub use config::Config;17
pub use response::Response;18
pub use server::Server;20
use error::Error;22
#[macro_use]23
extern crate log;25
pub const APP_NAME: &str = "verbal";27
pub type Result<T> = std::result::Result<T, Error>;29
pub trait IntoSql {30
fn into_sql(self) -> Result<String>;31
}33
pub fn init_logger() {34
Builder::new()35
.format_timestamp_secs()36
.filter_module(APP_NAME, LevelFilter::Info)37
.target(Target::Stdout)38
.init();39
}41
pub fn abort(err: &Error) -> ! {42
error!("{}", err);43
process::exit(1)44
}