Skip to content

Commit fae2f87

Browse files
authored
tweak logs: (fatedier#2100)
* show what config frps uses (config file / command line) * optimize the "start successfully" log message
1 parent 3d9499f commit fae2f87

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cmd/frps/root.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,13 +105,15 @@ var rootCmd = &cobra.Command{
105105
var cfg config.ServerCommonConf
106106
var err error
107107
if cfgFile != "" {
108+
log.Info("frps uses config file: %s", cfgFile)
108109
var content string
109110
content, err = config.GetRenderedConfFromFile(cfgFile)
110111
if err != nil {
111112
return err
112113
}
113114
cfg, err = parseServerCommonCfg(CfgFileTypeIni, content)
114115
} else {
116+
log.Info("frps uses command line arguments for config")
115117
cfg, err = parseServerCommonCfg(CfgFileTypeCmd, "")
116118
}
117119
if err != nil {
@@ -212,7 +214,7 @@ func runServer(cfg config.ServerCommonConf) (err error) {
212214
if err != nil {
213215
return err
214216
}
215-
log.Info("start frps success")
217+
log.Info("frps started successfully")
216218
svr.Run()
217219
return
218220
}

0 commit comments

Comments
 (0)