Add logging, including the json one

get infos from I've been pwned and the API on install.dm.gg/vpn-log.php

and send mail if there is anything strange
This commit is contained in:
Xavier Henner
2019-07-10 17:47:43 +02:00
parent 44cfdea6ed
commit 68de442333
14 changed files with 612 additions and 55 deletions

View File

@@ -42,7 +42,7 @@ func main() {
if *logToSyslog {
log.SetFlags(0)
server.syslog = true
logWriter, e := syslog.New(syslog.LOG_NOTICE, "")
logWriter, e := syslog.New(syslog.LOG_NOTICE, "vpnauth")
if e == nil {
log.SetOutput(logWriter)
defer logWriter.Close()