add -quiet options to imposm3 diff
parent
ea2065b5ec
commit
e0404e7a1d
|
@ -33,6 +33,7 @@ type _BaseOptions struct {
|
|||
LimitToCacheBuffer float64
|
||||
ConfigFile string
|
||||
Httpprofile string
|
||||
Quiet bool
|
||||
}
|
||||
|
||||
func (o *_BaseOptions) updateFromConfig() error {
|
||||
|
@ -98,7 +99,6 @@ type _ImportOptions struct {
|
|||
DeployProduction bool
|
||||
RevertDeploy bool
|
||||
RemoveBackup bool
|
||||
Quiet bool
|
||||
}
|
||||
|
||||
var BaseOptions = _BaseOptions{}
|
||||
|
@ -113,6 +113,8 @@ func addBaseFlags(flags *flag.FlagSet) {
|
|||
flags.Float64Var(&BaseOptions.LimitToCacheBuffer, "limittocachebuffer", 0.0, "limit to buffer for cache")
|
||||
flags.StringVar(&BaseOptions.ConfigFile, "config", "", "config (json)")
|
||||
flags.StringVar(&BaseOptions.Httpprofile, "httpprofile", "", "bind address for profile server")
|
||||
flags.BoolVar(&BaseOptions.Quiet, "quiet", false, "quiet log output")
|
||||
|
||||
}
|
||||
|
||||
func UsageImport() {
|
||||
|
@ -142,7 +144,6 @@ func init() {
|
|||
ImportFlags.BoolVar(&ImportOptions.DeployProduction, "deployproduction", false, "deploy production")
|
||||
ImportFlags.BoolVar(&ImportOptions.RevertDeploy, "revertdeploy", false, "revert deploy to production")
|
||||
ImportFlags.BoolVar(&ImportOptions.RemoveBackup, "removebackup", false, "remove backups from deploy")
|
||||
ImportFlags.BoolVar(&ImportOptions.Quiet, "quiet", false, "quiet log output")
|
||||
}
|
||||
|
||||
func ParseImport(args []string) {
|
||||
|
|
|
@ -23,7 +23,7 @@ import (
|
|||
var log = logging.NewLogger("")
|
||||
|
||||
func Import() {
|
||||
if config.ImportOptions.Quiet {
|
||||
if config.BaseOptions.Quiet {
|
||||
logging.SetQuiet(true)
|
||||
}
|
||||
|
||||
|
|
|
@ -49,9 +49,15 @@ func main() {
|
|||
import_.Import()
|
||||
case "diff":
|
||||
config.ParseDiffImport(os.Args[2:])
|
||||
|
||||
if config.BaseOptions.Httpprofile != "" {
|
||||
stats.StartHttpPProf(config.BaseOptions.Httpprofile)
|
||||
}
|
||||
|
||||
if config.BaseOptions.Quiet {
|
||||
logging.SetQuiet(true)
|
||||
}
|
||||
|
||||
var geometryLimiter *limit.Limiter
|
||||
if config.BaseOptions.LimitTo != "" {
|
||||
var err error
|
||||
|
|
Loading…
Reference in New Issue