From dece484ef755746d7a212694cffae65e2eaee6b8 Mon Sep 17 00:00:00 2001 From: KatolaZ Date: Mon, 3 Jul 2017 12:06:31 +0100 Subject: Added a Makefile and log_file option to the config file --- main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'main.go') diff --git a/main.go b/main.go index f241701..4aef702 100644 --- a/main.go +++ b/main.go @@ -43,8 +43,8 @@ var p_conf = Config{ bind_port: "8000", paste_dir: "./pastes", templ_dir: "./tmpl", - log_fname: "./binnit.log", max_size: 4096, + log_file: "./binnit.log", } @@ -171,9 +171,9 @@ func main() { parse_config("binnit.cfg", &p_conf) - f, err := os.OpenFile(p_conf.log_fname, os.O_APPEND | os.O_CREATE | os.O_RDWR, 0600) + f, err := os.OpenFile(p_conf.log_file, os.O_APPEND | os.O_CREATE | os.O_RDWR, 0600) if err != nil { - fmt.Fprintf(os.Stderr, "Error opening logfile: %s. Exiting\n", p_conf.log_fname) + fmt.Fprintf(os.Stderr, "Error opening log_file: %s. Exiting\n", p_conf.log_file) os.Exit(1) } defer f.Close() -- cgit v1.2.3