dead code

This commit is contained in:
A.Unger
2021-03-09 17:33:18 +01:00
parent f8a651bad2
commit 9c1a51be01

View File

@@ -1,13 +1,8 @@
package runtime
import (
"os"
mzlog "github.com/asim/go-micro/plugins/logger/zerolog/v3"
"github.com/asim/go-micro/v3/logger"
"github.com/owncloud/ocis/ocis-pkg/config"
"github.com/owncloud/ocis/ocis/pkg/runtime/service"
"github.com/rs/zerolog"
)
// Runtime represents an oCIS runtime environment.
@@ -26,17 +21,3 @@ func New(cfg *config.Config) Runtime {
func (r *Runtime) Start() error {
return service.Start(service.WithConfig(r.c))
}
// for logging reasons we don't want the same logging level on both oCIS and micro. As a framework builder we do not
// want to expose to the end user the internal framework logs unless explicitly specified.
func setMicroLogger(log config.Log) {
if os.Getenv("MICRO_LOG_LEVEL") == "" {
os.Setenv("MICRO_LOG_LEVEL", "error")
}
lev, err := zerolog.ParseLevel(os.Getenv("MICRO_LOG_LEVEL"))
if err != nil {
lev = zerolog.ErrorLevel
}
logger.DefaultLogger = mzlog.NewLogger(logger.WithLevel(logger.Level(lev)))
}