| OLD | NEW |
| 1 // Copyright 2015 The LUCI Authors. All rights reserved. | 1 // Copyright 2015 The LUCI Authors. All rights reserved. |
| 2 // Use of this source code is governed under the Apache License, Version 2.0 | 2 // Use of this source code is governed under the Apache License, Version 2.0 |
| 3 // that can be found in the LICENSE file. | 3 // that can be found in the LICENSE file. |
| 4 | 4 |
| 5 package main | 5 package main |
| 6 | 6 |
| 7 import ( | 7 import ( |
| 8 "bytes" | 8 "bytes" |
| 9 "flag" | 9 "flag" |
| 10 "fmt" | 10 "fmt" |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 a.outputConfig.AddFactory(f) | 94 a.outputConfig.AddFactory(f) |
| 95 } | 95 } |
| 96 | 96 |
| 97 a.maxBufferAge = clockflag.Duration(butler.DefaultMaxBufferAge) | 97 a.maxBufferAge = clockflag.Duration(butler.DefaultMaxBufferAge) |
| 98 | 98 |
| 99 fs.Var(&a.project, "project", | 99 fs.Var(&a.project, "project", |
| 100 "The log prefix's project name (required).") | 100 "The log prefix's project name (required).") |
| 101 fs.Var(&a.prefix, "prefix", | 101 fs.Var(&a.prefix, "prefix", |
| 102 "Prefix to apply to all stream names.") | 102 "Prefix to apply to all stream names.") |
| 103 fs.StringVar(&a.coordinatorHost, "coordinator-host", "", | 103 fs.StringVar(&a.coordinatorHost, "coordinator-host", "", |
| 104 » » "The Coordinator host to pass on to subprocesses.") | 104 » » "The Coordinator service host to use.") |
| 105 fs.Var(&a.outputConfig, "output", | 105 fs.Var(&a.outputConfig, "output", |
| 106 "The output name and configuration. Specify 'help' for more info
rmation.") | 106 "The output name and configuration. Specify 'help' for more info
rmation.") |
| 107 fs.IntVar(&a.outputWorkers, "output-workers", butler.DefaultOutputWorker
s, | 107 fs.IntVar(&a.outputWorkers, "output-workers", butler.DefaultOutputWorker
s, |
| 108 "The maximum number of parallel output dispatches.") | 108 "The maximum number of parallel output dispatches.") |
| 109 fs.Var(&a.globalTags, "tag", | 109 fs.Var(&a.globalTags, "tag", |
| 110 "Specify key[=value] tags to be applied to all log streams. Indi
vidual treams may override. Can "+ | 110 "Specify key[=value] tags to be applied to all log streams. Indi
vidual treams may override. Can "+ |
| 111 "be specified multiple times.") | 111 "be specified multiple times.") |
| 112 fs.Var(&a.maxBufferAge, "output-max-buffer-age", | 112 fs.Var(&a.maxBufferAge, "output-max-buffer-age", |
| 113 "Send buffered messages if they've been held for longer than thi
s period.") | 113 "Send buffered messages if they've been held for longer than thi
s period.") |
| 114 fs.BoolVar(&a.noBufferLogs, "output-no-buffer", false, | 114 fs.BoolVar(&a.noBufferLogs, "output-no-buffer", false, |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 | 352 |
| 353 paniccatcher.Do(func() { | 353 paniccatcher.Do(func() { |
| 354 rc = mainImpl(ctx, chromeinfra.DefaultAuthOptions(), os.Args[1:]
) | 354 rc = mainImpl(ctx, chromeinfra.DefaultAuthOptions(), os.Args[1:]
) |
| 355 }, func(p *paniccatcher.Panic) { | 355 }, func(p *paniccatcher.Panic) { |
| 356 log.Fields{ | 356 log.Fields{ |
| 357 "panic.error": p.Reason, | 357 "panic.error": p.Reason, |
| 358 }.Errorf(ctx, "Panic caught in main:\n%s", p.Stack) | 358 }.Errorf(ctx, "Panic caught in main:\n%s", p.Stack) |
| 359 rc = runtimeErrorReturnCode | 359 rc = runtimeErrorReturnCode |
| 360 }) | 360 }) |
| 361 } | 361 } |
| OLD | NEW |