From fae2f8768d29c1806ac136b876b44fac8bc2725c Mon Sep 17 00:00:00 2001
From: wxiaoguang <wxiaoguang@gmail.com>
Date: Mon, 23 Nov 2020 17:01:31 +0800
Subject: [PATCH] tweak logs: (#2100)

* show what config frps uses (config file / command line)
* optimize the "start successfully" log message
---
 cmd/frps/root.go | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/cmd/frps/root.go b/cmd/frps/root.go
index 1157c2f8..6dd268f3 100644
--- a/cmd/frps/root.go
+++ b/cmd/frps/root.go
@@ -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
 }