Use string value for pid in JSON log (#110)

This commit is contained in:
Arthur Barr
2018-06-04 16:37:50 +01:00
committed by Rob Parker
parent 5d0a87ae0a
commit 2939a9fd1a

View File

@@ -23,6 +23,7 @@ import (
"io"
"os"
"os/user"
"strconv"
"sync"
"time"
)
@@ -40,7 +41,7 @@ type Logger struct {
debug bool
json bool
processName string
pid int
pid string
serverName string
host string
user *user.User
@@ -62,7 +63,7 @@ func NewLogger(writer io.Writer, debug bool, json bool, serverName string) (*Log
debug: debug,
json: json,
processName: os.Args[0],
pid: os.Getpid(),
pid: strconv.Itoa(os.Getpid()),
serverName: serverName,
host: hostname,
user: user,