diff options
Diffstat (limited to 'rhimport')
-rw-r--r-- | rhimport/session_store.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/rhimport/session_store.go b/rhimport/session_store.go index ec01071..a9b3e81 100644 --- a/rhimport/session_store.go +++ b/rhimport/session_store.go @@ -28,6 +28,7 @@ import ( "crypto/rand" "encoding/base64" "fmt" + "io/ioutil" "log" "net/http" "strings" @@ -390,6 +391,13 @@ func (store *sessionStore) Cleanup() { } func NewSessionStore(conf *Config, db *rddb.DB, stdlog, dbglog *log.Logger) (store *sessionStore, err error) { + if stdlog == nil { + stdlog = log.New(ioutil.Discard, "", 0) + } + if dbglog == nil { + dbglog = log.New(ioutil.Discard, "", 0) + } + store = &sessionStore{} store.conf = conf store.db = db |