update for logging

This commit is contained in:
Ted Unangst 2022-03-03 15:48:45 -05:00
parent f0aa7f03e2
commit 72e2424606
4 changed files with 6 additions and 5 deletions

View File

@ -35,7 +35,7 @@ import (
) )
func adminscreen() { func adminscreen() {
log.InitX("honk", "null", "null", "null") log.Init(log.Options{Progname: "honk", Alllogname: "null"})
stdout := bufio.NewWriter(os.Stdout) stdout := bufio.NewWriter(os.Stdout)
esc := "\x1b" esc := "\x1b"
smcup := esc + "[?1049h" smcup := esc + "[?1049h"

2
go.mod
View File

@ -10,5 +10,5 @@ require (
golang.org/x/image v0.0.0-20200927104501-e162460cd6b5 // indirect golang.org/x/image v0.0.0-20200927104501-e162460cd6b5 // indirect
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b golang.org/x/net v0.0.0-20201110031124-69a78807bb2b
humungus.tedunangst.com/r/go-sqlite3 v1.1.3 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
) )

4
go.sum
View File

@ -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= 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 h1:G2N4wzDS0NbuvrZtQJhh4F+3X+s7BF8b9ga8k38geUI=
humungus.tedunangst.com/r/go-sqlite3 v1.1.3/go.mod h1:FtEEmQM7U2Ey1TuEEOyY1BmphTZnmiEjPsNLEAkpf/M= 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.51 h1:WMXV53VGwvZYPeB/H1lEhimauPzKSZUb00lIXvXH7PM=
humungus.tedunangst.com/r/webs v0.6.50/go.mod h1:S9sXpVSbgAIa24yYhnMN0C94LKHG+2rioS+NsiDimps= humungus.tedunangst.com/r/webs v0.6.51/go.mod h1:S9sXpVSbgAIa24yYhnMN0C94LKHG+2rioS+NsiDimps=

View File

@ -20,6 +20,7 @@ import (
"fmt" "fmt"
"html/template" "html/template"
golog "log" golog "log"
"log/syslog"
notrand "math/rand" notrand "math/rand"
"os" "os"
"strconv" "strconv"
@ -282,7 +283,7 @@ func main() {
flag.StringVar(&viewDir, "viewdir", viewDir, "view directory") flag.StringVar(&viewDir, "viewdir", viewDir, "view directory")
flag.Parse() flag.Parse()
log.Init("honk") log.Init(log.Options{Progname: "honk", Facility: syslog.LOG_UUCP})
elog = log.E elog = log.E
ilog = log.I ilog = log.I
dlog = log.D dlog = log.D