Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

Commit

Permalink
Simplify logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Kit committed Apr 17, 2019
1 parent 072e75e commit 7af915f
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ extern crate actix_web;
extern crate log;
extern crate env_logger;

use log::Level;

use actix_web::actix::{Actor, Addr, System};
use actix_web::{http, middleware, server, App, Binary, FromRequest, HttpRequest, Responder};
use env_logger::Env;
Expand Down Expand Up @@ -53,14 +51,7 @@ fn run_server(host: &str, port: &str, repo_root: &Path) {

let repos = git::load_repos(&repo_root);

if log_enabled!(Level::Info) {
let keys = repos
.keys()
.map(|key| (*key).clone())
.collect::<Vec<String>>();

info!("Loaded Git repos: [{}]", keys.join(", "))
}
info!("Loaded Git repos: {:?}", repos.keys());

let addr = GitRepos::new(repos).start();
let listen_address = format!("{}:{}", host, port);
Expand Down

0 comments on commit 7af915f

Please sign in to comment.