tweak logs: (#2100)

* show what config frps uses (config file / command line)
* optimize the "start successfully" log message
This commit is contained in:
wxiaoguang 2020-11-23 17:01:31 +08:00 committed by GitHub
parent 3d9499f554
commit fae2f8768d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -105,6 +105,7 @@ 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 {
@ -112,6 +113,7 @@ var rootCmd = &cobra.Command{
}
cfg, err = parseServerCommonCfg(CfgFileTypeIni, content)
} else {
log.Info("frps uses command line arguments for config")
cfg, err = parseServerCommonCfg(CfgFileTypeCmd, "")
}
if err != nil {
@ -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
}