diff options
author | Laria Carolin Chabowski <laria@laria.me> | 2017-12-18 22:34:56 +0100 |
---|---|---|
committer | Laria Carolin Chabowski <laria@laria.me> | 2017-12-18 22:35:09 +0100 |
commit | b01cef071c5e95f73e756c3d039e2ddf1a6ed3df (patch) | |
tree | 12573257a20a055e86526602535018756c9e9527 /env.go | |
parent | 2cfd9f146d042a1c30176ad91fea730df439704d (diff) | |
download | petrific-b01cef071c5e95f73e756c3d039e2ddf1a6ed3df.tar.gz petrific-b01cef071c5e95f73e756c3d039e2ddf1a6ed3df.tar.bz2 petrific-b01cef071c5e95f73e756c3d039e2ddf1a6ed3df.zip |
Add logging
Diffstat (limited to 'env.go')
-rw-r--r-- | env.go | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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 |