diff options
author | KatolaZ <katolaz@freaknet.org> | 2017-07-03 12:06:31 +0100 |
---|---|---|
committer | KatolaZ <katolaz@freaknet.org> | 2017-07-03 12:06:31 +0100 |
commit | dece484ef755746d7a212694cffae65e2eaee6b8 (patch) | |
tree | c832196914a1f6132fbe6be191d69ee8df7e2833 /main.go | |
parent | 4a9c3b4604b308a80984fddb9caf8b79fe553e97 (diff) |
Added a Makefile and log_file option to the config file0.1
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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() |