(subcommands []*cli.Command)
| 63 | } |
| 64 | |
| 65 | func buildTailCommand(subcommands []*cli.Command) *cli.Command { |
| 66 | return &cli.Command{ |
| 67 | Name: "tail", |
| 68 | Action: Run, |
| 69 | Usage: "Stream logs from a remote cloudflared", |
| 70 | UsageText: "cloudflared tail [tail command options] [TUNNEL-ID]", |
| 71 | Flags: []cli.Flag{ |
| 72 | &cli.StringFlag{ |
| 73 | Name: "connector-id", |
| 74 | Usage: "Access a specific cloudflared instance by connector id (for when a tunnel has multiple cloudflared's)", |
| 75 | Value: "", |
| 76 | EnvVars: []string{"TUNNEL_MANAGEMENT_CONNECTOR"}, |
| 77 | }, |
| 78 | &cli.StringSliceFlag{ |
| 79 | Name: "event", |
| 80 | Usage: "Filter by specific Events (cloudflared, http, tcp, udp) otherwise, defaults to send all events", |
| 81 | EnvVars: []string{"TUNNEL_MANAGEMENT_FILTER_EVENTS"}, |
| 82 | }, |
| 83 | &cli.StringFlag{ |
| 84 | Name: "level", |
| 85 | Usage: "Filter by specific log levels (debug, info, warn, error). Filters by debug log level by default.", |
| 86 | EnvVars: []string{"TUNNEL_MANAGEMENT_FILTER_LEVEL"}, |
| 87 | Value: "debug", |
| 88 | }, |
| 89 | &cli.Float64Flag{ |
| 90 | Name: "sample", |
| 91 | Usage: "Sample log events by percentage (0.0 .. 1.0). No sampling by default.", |
| 92 | EnvVars: []string{"TUNNEL_MANAGEMENT_FILTER_SAMPLE"}, |
| 93 | Value: 1.0, |
| 94 | }, |
| 95 | &cli.StringFlag{ |
| 96 | Name: "token", |
| 97 | Usage: "Access token for a specific tunnel", |
| 98 | Value: "", |
| 99 | EnvVars: []string{"TUNNEL_MANAGEMENT_TOKEN"}, |
| 100 | }, |
| 101 | &cli.StringFlag{ |
| 102 | Name: cfdflags.ManagementHostname, |
| 103 | Usage: "Management hostname to signify incoming management requests", |
| 104 | EnvVars: []string{"TUNNEL_MANAGEMENT_HOSTNAME"}, |
| 105 | Hidden: true, |
| 106 | Value: "management.argotunnel.com", |
| 107 | }, |
| 108 | &cli.StringFlag{ |
| 109 | Name: "trace", |
| 110 | Usage: "Set a cf-trace-id for the request", |
| 111 | Hidden: true, |
| 112 | Value: "", |
| 113 | }, |
| 114 | &cli.StringFlag{ |
| 115 | Name: cfdflags.LogLevel, |
| 116 | Value: "info", |
| 117 | Usage: "Application logging level {debug, info, warn, error, fatal}", |
| 118 | EnvVars: []string{"TUNNEL_LOGLEVEL"}, |
| 119 | }, |
| 120 | &cli.StringFlag{ |
| 121 | Name: cfdflags.OriginCert, |
| 122 | Usage: "Path to the certificate generated for your origin when you run cloudflared login.", |
no test coverage detected