From 72e24246069df695e74895519444376588f122ee Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Thu, 3 Mar 2022 15:48:45 -0500 Subject: [PATCH] update for logging --- admin.go | 2 +- go.mod | 2 +- go.sum | 4 ++-- honk.go | 3 ++- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/admin.go b/admin.go index 1b9d9f0..ad24e5d 100644 --- a/admin.go +++ b/admin.go @@ -35,7 +35,7 @@ import ( ) func adminscreen() { - log.InitX("honk", "null", "null", "null") + log.Init(log.Options{Progname: "honk", Alllogname: "null"}) stdout := bufio.NewWriter(os.Stdout) esc := "\x1b" smcup := esc + "[?1049h" diff --git a/go.mod b/go.mod index f235a28..90ff9ab 100644 --- a/go.mod +++ b/go.mod @@ -10,5 +10,5 @@ require ( golang.org/x/image v0.0.0-20200927104501-e162460cd6b5 // indirect golang.org/x/net v0.0.0-20201110031124-69a78807bb2b humungus.tedunangst.com/r/go-sqlite3 v1.1.3 - humungus.tedunangst.com/r/webs v0.6.50 + humungus.tedunangst.com/r/webs v0.6.51 ) diff --git a/go.sum b/go.sum index f0bb588..3ea5d42 100644 --- a/go.sum +++ b/go.sum @@ -24,5 +24,5 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= humungus.tedunangst.com/r/go-sqlite3 v1.1.3 h1:G2N4wzDS0NbuvrZtQJhh4F+3X+s7BF8b9ga8k38geUI= humungus.tedunangst.com/r/go-sqlite3 v1.1.3/go.mod h1:FtEEmQM7U2Ey1TuEEOyY1BmphTZnmiEjPsNLEAkpf/M= -humungus.tedunangst.com/r/webs v0.6.50 h1:MScU6TwnaluLUuyveARr43iXJkv2xeyAWBKea+5tnLA= -humungus.tedunangst.com/r/webs v0.6.50/go.mod h1:S9sXpVSbgAIa24yYhnMN0C94LKHG+2rioS+NsiDimps= +humungus.tedunangst.com/r/webs v0.6.51 h1:WMXV53VGwvZYPeB/H1lEhimauPzKSZUb00lIXvXH7PM= +humungus.tedunangst.com/r/webs v0.6.51/go.mod h1:S9sXpVSbgAIa24yYhnMN0C94LKHG+2rioS+NsiDimps= diff --git a/honk.go b/honk.go index 8b1114c..6b648b4 100644 --- a/honk.go +++ b/honk.go @@ -20,6 +20,7 @@ import ( "fmt" "html/template" golog "log" + "log/syslog" notrand "math/rand" "os" "strconv" @@ -282,7 +283,7 @@ func main() { flag.StringVar(&viewDir, "viewdir", viewDir, "view directory") flag.Parse() - log.Init("honk") + log.Init(log.Options{Progname: "honk", Facility: syslog.LOG_UUCP}) elog = log.E ilog = log.I dlog = log.D