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 --- config.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'config.go') diff --git a/config.go b/config.go index 7313356..9967ab8 100644 --- a/config.go +++ b/config.go @@ -41,8 +41,8 @@ type Config struct { bind_port string paste_dir string templ_dir string - log_fname string max_size uint16 + log_file string } @@ -54,8 +54,8 @@ func (c Config) String() string { s+= "Listening on: " + c.bind_addr + ":" + c.bind_port +"\n" s+= "paste_dir: " + c.paste_dir + "\n" s+= "templ_dir: " + c.templ_dir + "\n" - s+= "log_fname: " + c.log_fname + "\n" s+= "max_size: " + string(c.max_size) + "\n" + s+= "log_file: " + c.log_file + "\n" return s @@ -93,8 +93,8 @@ func parse_config (fname string, c *Config) error { c.paste_dir = strings.Trim(fields[1], " \t\"") case "templ_dir": c.templ_dir = strings.Trim(fields[1], " \t\"") - case "log_fname": - c.log_fname = strings.Trim(fields[1], " \t\"") + case "log_file": + c.log_file = strings.Trim(fields[1], " \t\"") case "max_size": if m_size, err := strconv.ParseUint(fields[1], 10, 16); err == nil { c.max_size = uint16(m_size) -- cgit v1.2.3