don't compile logger on windows

This commit is contained in:
Mashy 2019-11-18 23:00:58 +10:00
parent f66be37f8a
commit 5fdabc0f21

View File

@ -62,6 +62,7 @@ use std::path::{Path};
use fern::colors::{Color, ColoredLevelConfig};
use crossbeam_channel::{unbounded};
#[cfg(unix)]
pub fn setup_logger() -> Result<(), fern::InitError> {
let formatter = syslog::Formatter3164 {
facility: syslog::Facility::LOG_USER,
@ -109,6 +110,7 @@ pub fn setup_logger() -> Result<(), fern::InitError> {
}
pub fn start() {
#[cfg(unix)]
setup_logger().unwrap();
dotenv::from_path(Path::new("/etc/mnml/gs.conf")).ok();