mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-08-07 22:42:22 -04:00
Add verbosity flag to all services (#244)
Signed-off-by: Daniel Weiße <dw@edgeless.systems>
This commit is contained in:
parent
3177b2fdb7
commit
0a874496b3
7 changed files with 44 additions and 17 deletions
|
@ -23,7 +23,6 @@ import (
|
|||
"github.com/edgelesssys/constellation/state/setup"
|
||||
"github.com/spf13/afero"
|
||||
"go.uber.org/zap"
|
||||
"go.uber.org/zap/zapcore"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -32,12 +31,12 @@ const (
|
|||
qemuStateDiskPath = "/dev/vda"
|
||||
)
|
||||
|
||||
var csp = flag.String("csp", "", "Cloud Service Provider the image is running on")
|
||||
|
||||
func main() {
|
||||
flag.Parse()
|
||||
csp := flag.String("csp", "", "Cloud Service Provider the image is running on")
|
||||
verbosity := flag.Int("v", 0, logger.CmdLineVerbosityDescription)
|
||||
|
||||
log := logger.New(logger.JSONLog, zapcore.InfoLevel)
|
||||
flag.Parse()
|
||||
log := logger.New(logger.JSONLog, logger.VerbosityFromInt(*verbosity))
|
||||
log.With(zap.String("version", constants.VersionInfo), zap.String("cloudProvider", *csp)).
|
||||
Infof("Starting disk-mapper")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue