21037: fixed most of the linter warnings Arvados-DCO-1.1-Signed-off-by: Lisa Knox...
[arvados.git] / lib / mount / command.go
index 4cb744274b2b4fc3aed3ef1c9e20e8155aaa8d8d..eab9fd944ce405825c4a3723f5e159f01e151ae5 100644 (file)
@@ -50,6 +50,7 @@ func (c *mountCommand) RunCommand(prog string, args []string, stdin io.Reader, s
        experimental := flags.Bool("experimental", false, "acknowledge this is an experimental command, and should not be used in production (required)")
        cacheSizeStr := flags.String("cache-size", "0", "cache size as percent of home filesystem size (\"5%\") or size (\"10GiB\") or 0 for automatic")
        logLevel := flags.String("log-level", "info", "logging level (debug, info, ...)")
+       debug := flags.Bool("debug", false, "alias for -log-level=debug")
        pprof := flags.String("pprof", "", "serve Go profile data at `[addr]:port`")
        if ok, code := cmd.ParseFlags(flags, prog, args, "[FUSE mount options]", stderr); !ok {
                return code
@@ -63,6 +64,9 @@ func (c *mountCommand) RunCommand(prog string, args []string, stdin io.Reader, s
                logger.WithError(err).Error("invalid argument for -log-level flag")
                return 2
        }
+       if *debug {
+               lvl = logrus.DebugLevel
+       }
        logger.SetLevel(lvl)
        if *pprof != "" {
                go func() {