Skip to content

Commit

Permalink
tweak logs: (fatedier#2100)
Browse files Browse the repository at this point in the history
* show what config frps uses (config file / command line)
* optimize the "start successfully" log message
  • Loading branch information
wxiaoguang authored Nov 23, 2020
1 parent 3d9499f commit fae2f87
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/frps/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,15 @@ var rootCmd = &cobra.Command{
var cfg config.ServerCommonConf
var err error
if cfgFile != "" {
log.Info("frps uses config file: %s", cfgFile)
var content string
content, err = config.GetRenderedConfFromFile(cfgFile)
if err != nil {
return err
}
cfg, err = parseServerCommonCfg(CfgFileTypeIni, content)
} else {
log.Info("frps uses command line arguments for config")
cfg, err = parseServerCommonCfg(CfgFileTypeCmd, "")
}
if err != nil {
Expand Down Expand Up @@ -212,7 +214,7 @@ func runServer(cfg config.ServerCommonConf) (err error) {
if err != nil {
return err
}
log.Info("start frps success")
log.Info("frps started successfully")
svr.Run()
return
}

0 comments on commit fae2f87

Please sign in to comment.