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