Add profiler flag (#336)

Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2021-04-25 18:04:07 +02:00
committed by GitHub
parent 4c6606d882
commit 0438ca485f
8 changed files with 50 additions and 8 deletions

View File

@@ -6,6 +6,7 @@ import "github.com/alecthomas/kong"
type Cli struct {
Version kong.VersionFlag
Cfgfile string `kong:"name='config',env='CONFIG',help='Diun configuration file.'"`
Profiler string `kong:"name='profiler',env='PROFILER',enum='cpu,mem,alloc,heap,routines,mutex,threads,block',help='Profiler to use.'"`
LogLevel string `kong:"name='log-level',env='LOG_LEVEL',default='info',help='Set log level.'"`
LogJSON bool `kong:"name='log-json',env='LOG_JSON',default='false',help='Enable JSON logging output.'"`
LogCaller bool `kong:"name='log-caller',env='LOG_CALLER',default='false',help='Add file:line of the caller to log output.'"`