~pkal/survey

3e51104e595fd918d8fecd414e070c16cee7377e — Philip K 1 year, 3 months ago 1951624
Drop debug flag
1 files changed, 4 insertions(+), 10 deletions(-)

M survey.go
M survey.go => survey.go +4 -10
@@ 8,7 8,6 @@ import (
	"fmt"
	"html/template"
	"io"
	"io/ioutil"
	"log"
	"log/syslog"
	"net/http"


@@ 192,7 191,7 @@ var (
	survey         *Survey
	rawPage        []byte

	l = log.New(ioutil.Discard, "", 0)
	l = log.New(os.Stderr, "", 0)
)

func index(w http.ResponseWriter, r *http.Request) {


@@ 395,17 394,12 @@ func parseSummary(in io.Reader) *Survey {

func main() {
	var (
		err error

		slog  = flag.Bool("syslog", false, "Enable syslog support")
		debug = flag.Bool("debug", false, "Log to stderr")
		err  error
		slog = flag.Bool("syslog", false, "Enable syslog support")
	)

	flag.Parse()
	switch {
	case *debug:
		l = log.New(os.Stderr, "", log.LstdFlags)
	case *slog:
	if *slog {
		l, err = syslog.NewLogger(syslog.LOG_INFO, log.LstdFlags)
		if err != nil {
			log.Fatal(err)