aboutsummaryrefslogtreecommitdiff
path: root/env.go
diff options
context:
space:
mode:
authorLaria Carolin Chabowski <laria@laria.me>2017-12-18 22:34:56 +0100
committerLaria Carolin Chabowski <laria@laria.me>2017-12-18 22:35:09 +0100
commitb01cef071c5e95f73e756c3d039e2ddf1a6ed3df (patch)
tree12573257a20a055e86526602535018756c9e9527 /env.go
parent2cfd9f146d042a1c30176ad91fea730df439704d (diff)
downloadpetrific-b01cef071c5e95f73e756c3d039e2ddf1a6ed3df.tar.gz
petrific-b01cef071c5e95f73e756c3d039e2ddf1a6ed3df.tar.bz2
petrific-b01cef071c5e95f73e756c3d039e2ddf1a6ed3df.zip
Add logging
Diffstat (limited to 'env.go')
-rw-r--r--env.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/env.go b/env.go
index ad8cf9a..9ec74e8 100644
--- a/env.go
+++ b/env.go
@@ -3,6 +3,7 @@ package main
import (
"code.laria.me/petrific/cache"
"code.laria.me/petrific/config"
+ "code.laria.me/petrific/logging"
"code.laria.me/petrific/storage"
"code.laria.me/petrific/storage/registry"
"fmt"
@@ -13,6 +14,7 @@ type Env struct {
Conf config.Config
Store storage.Storage
IdCache cache.Cache
+ Log *logging.Log
}
func (e *Env) Close() {
@@ -40,8 +42,9 @@ func (env *Env) loadCache() error {
return nil
}
-func NewEnv(confPath, storageName string) (*Env, error) {
+func NewEnv(log *logging.Log, confPath, storageName string) (*Env, error) {
env := new(Env)
+ env.Log = log
var err error