FeatureBase renaming: version info in server log

This commit is contained in:
Mahesh Arumugam 2021-07-12 12:25:43 -07:00
parent 2f31ef17e2
commit 48fcb3a198
3 changed files with 9 additions and 5 deletions

View file

@ -35,9 +35,9 @@ func NewRootCommand(stdin io.Reader, stdout, stderr io.Writer) *cobra.Command {
This binary contains Pilosa itself, as well as common
tools for administering Pilosa, importing/exporting data,
backing up, and more. Complete documentation is available
at https://www.pilosa.com/docs/.
at https://docs.molecula.cloud/.
` + pilosa.VersionInfo() + "\n",
` + pilosa.VersionInfo(false) + "\n",
PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
v := viper.New()
err := setAllConfig(v, cmd.Flags())

View file

@ -342,7 +342,7 @@ func (m *Command) SetupServer() error {
return errors.Wrap(err, "setting up logger")
}
m.logger.Infof("%s", pilosa.VersionInfo())
m.logger.Infof("%s", pilosa.VersionInfo(m.Config.Future.Rename))
handleTrialDeadline(m.logger)

View file

@ -26,7 +26,7 @@ var BuildTime string
var GoVersion string = runtime.Version()
var TrialDeadline string
func VersionInfo() string {
func VersionInfo(rename bool) string {
var prefix string
if Variant != "" {
prefix = Variant + " "
@ -56,5 +56,9 @@ func VersionInfo() string {
if TrialDeadline != "" {
suffix += " limited time trial ends on: " + TrialDeadline
}
return prefix + "FeatureBase" + suffix
productName := "Pilosa"
if rename {
productName = "FeatureBase"
}
return prefix + productName + suffix
}