Set up info logging even if the server is started with no RUST_LOG variable #17

Manually merged
tlater merged 2 commits from tlater/server-add-logging into master 2022-10-05 13:11:04 +01:00
Showing only changes of commit 73b9fbf612 - Show all commits

View file

@ -44,8 +44,11 @@ struct SharedData<'a> {
#[actix_web::main] #[actix_web::main]
async fn main() -> std::io::Result<()> { async fn main() -> std::io::Result<()> {
let mut config = Config::parse(); let config = {
config.template_directory = config.template_directory.canonicalize()?; let mut config = Config::parse();
config.template_directory = config.template_directory.canonicalize()?;
config
};
env_logger::Builder::new() env_logger::Builder::new()
.filter_level(if config.dev_mode { .filter_level(if config.dev_mode {