Add verbosity flag to all services (#244)

Signed-off-by: Daniel Weiße <dw@edgeless.systems>
This commit is contained in:
Daniel Weiße 2022-07-01 16:17:06 +02:00 committed by GitHub
parent 3177b2fdb7
commit 0a874496b3
7 changed files with 44 additions and 17 deletions

View file

@ -1,6 +1,7 @@
package main
import (
"flag"
"net"
"os"
"sync"
@ -16,14 +17,15 @@ import (
"github.com/edgelesssys/constellation/internal/deploy/user"
"github.com/edgelesssys/constellation/internal/logger"
"github.com/spf13/afero"
"go.uber.org/zap/zapcore"
"golang.org/x/net/context"
)
func main() {
wg := &sync.WaitGroup{}
verbosity := flag.Int("v", 0, logger.CmdLineVerbosityDescription)
log := logger.New(logger.JSONLog, zapcore.InfoLevel)
flag.Parse()
log := logger.New(logger.JSONLog, logger.VerbosityFromInt(*verbosity))
fs := afero.NewOsFs()
streamer := coordinator.NewFileStreamer(fs)
serviceManager := deploy.NewServiceManager(log.Named("serviceManager"))