Skip to content

Commit

Permalink
Fix review comments
Browse files Browse the repository at this point in the history
Signed-off-by: Pavol Loffay <ploffay@redhat.com>
  • Loading branch information
pavolloffay committed Nov 9, 2017
1 parent ed548b3 commit 1af7518
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cmd/agent/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func main() {
if err := agent.Run(); err != nil {
return errors.Wrap(err, "Failed to run the agent")
}
select {}
return nil
},
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/collector/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ func main() {
case <-signalsChannel:
logger.Info("Jaeger Collector is finishing")
}
select {}
return nil
},
}

Expand Down
6 changes: 3 additions & 3 deletions cmd/flags/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const (
// ESStorageType is the storage type flag denoting an ElasticSearch backing store
ESStorageType = "elasticsearch"
spanStorageType = "span-storage.type"
logLevel = "log-Level"
logLevel = "log-level"
dependencyStorageDataFrequency = "dependency-storage.data-frequency"
configFile = "config-file"
)
Expand All @@ -55,7 +55,7 @@ func TryLoadConfigFile(v *viper.Viper) error {
return nil
}

// NewLogger pareses log Level
// NewLogger returns logger based on configuration in SharedFlags
func (flags *SharedFlags) NewLogger(conf zap.Config, options ...zap.Option) (*zap.Logger, error) {
var level zapcore.Level
err := (&level).UnmarshalText([]byte(flags.Logging.Level))
Expand Down Expand Up @@ -87,7 +87,7 @@ func (flags *SharedFlags) InitFromViper(v *viper.Viper) *SharedFlags {
// AddFlags adds flags for SharedFlags
func AddFlags(flagSet *flag.FlagSet) {
flagSet.String(spanStorageType, CassandraStorageType, fmt.Sprintf("The type of span storage backend to use, options are currently [%v,%v,%v]", CassandraStorageType, ESStorageType, MemoryStorageType))
flagSet.String(logLevel, "info", "Minimal allowed log Level. For more levels see zap logger documentation")
flagSet.String(logLevel, "info", "Minimal allowed log Level. For more levels see https://github.com/uber-go/zap")
flagSet.Duration(dependencyStorageDataFrequency, time.Hour*24, "Frequency of service dependency calculations")
}

Expand Down
3 changes: 2 additions & 1 deletion cmd/query/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ func main() {
case <-serverChannel:
logger.Info("Jaeger Query is finishing")
}
select {}
return nil
},
}

Expand All @@ -144,6 +144,7 @@ func main() {
)

if error := command.Execute(); error != nil {
fmt.Println("kik")
fmt.Println(error.Error())
os.Exit(1)
}
Expand Down

0 comments on commit 1af7518

Please sign in to comment.