diff options
author | Christian Pointner <equinox@helsinki.at> | 2016-07-23 23:45:34 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2016-07-23 23:45:34 (GMT) |
commit | 38cde493d2a9a1961e057fe0e175b437b3916148 (patch) | |
tree | 8c7451fb2a8466d0e25c95dd45f1a9dbf846b7dc /src/rhimportd/main.go | |
parent | b29107e4dd06e176f88fdaa7f01bb6b1b34a8613 (diff) |
refactored logging
Diffstat (limited to 'src/rhimportd/main.go')
-rw-r--r-- | src/rhimportd/main.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/rhimportd/main.go b/src/rhimportd/main.go index 72785c0..4f12572 100644 --- a/src/rhimportd/main.go +++ b/src/rhimportd/main.go @@ -38,14 +38,15 @@ import ( ) var ( - rhl = log.New(os.Stderr, "[rhimportd]\t", log.LstdFlags) - rhdl = log.New(ioutil.Discard, "[rhimportd-dbg]\t", log.LstdFlags) + rhl = log.New(os.Stderr, "[std] ", log.LstdFlags) + rhdl = log.New(ioutil.Discard, "[dbg] ", log.LstdFlags) ) func init() { if _, exists := os.LookupEnv("RHIMPORTD_DEBUG"); exists { rhdl.SetOutput(os.Stderr) } + rhimport.Init(rhl, rhdl) } type envStringValue string @@ -128,7 +129,7 @@ func main() { } defer db.Cleanup() - sessions, err := rhimport.NewSessionStore(conf, db.GetInterface()) + sessions, err := rhimport.NewSessionStore(conf, db.GetInterface(), rhl, rhdl) if err != nil { rhl.Println("Error initializing Session Store:", err) return |