1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
11 "git.curoverse.com/arvados.git/sdk/go/config"
12 "git.curoverse.com/arvados.git/sdk/go/ctxlog"
15 var logger = ctxlog.FromContext
21 configPath := flag.String("config", "/etc/arvados/ws/ws.yml", "`path` to config file")
22 dumpConfig := flag.Bool("dump-config", false, "show current configuration and exit")
23 getVersion := flag.Bool("version", false, "Print version information and exit.")
24 cfg := defaultConfig()
27 // Print version information if requested
29 fmt.Printf("arvados-ws %s\n", version)
33 err := config.LoadFile(&cfg, *configPath)
38 ctxlog.SetLevel(cfg.LogLevel)
39 ctxlog.SetFormat(cfg.LogFormat)
42 txt, err := config.Dump(&cfg)
46 fmt.Print(string(txt))
50 log.Printf("arvados-ws %s started", version)
51 srv := &server{wsConfig: &cfg}