mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 21:28:11 +09:00 
			
		
		
		
	Always emit the configuration path (#17036)
Often when handling problems it is not clear which configuration file Gitea is using. This PR simply ensures that the configuration file is emitted. Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
		| @@ -31,6 +31,7 @@ func runConvert(ctx *cli.Context) error { | |||||||
| 	log.Info("AppWorkPath: %s", setting.AppWorkPath) | 	log.Info("AppWorkPath: %s", setting.AppWorkPath) | ||||||
| 	log.Info("Custom path: %s", setting.CustomPath) | 	log.Info("Custom path: %s", setting.CustomPath) | ||||||
| 	log.Info("Log path: %s", setting.LogRootPath) | 	log.Info("Log path: %s", setting.LogRootPath) | ||||||
|  | 	log.Info("Configuration file: %s", setting.CustomConf) | ||||||
| 	setting.InitDBConfig() | 	setting.InitDBConfig() | ||||||
|  |  | ||||||
| 	if !setting.Database.UseMySQL { | 	if !setting.Database.UseMySQL { | ||||||
|   | |||||||
| @@ -84,6 +84,7 @@ func runDumpRepository(ctx *cli.Context) error { | |||||||
| 	log.Info("AppWorkPath: %s", setting.AppWorkPath) | 	log.Info("AppWorkPath: %s", setting.AppWorkPath) | ||||||
| 	log.Info("Custom path: %s", setting.CustomPath) | 	log.Info("Custom path: %s", setting.CustomPath) | ||||||
| 	log.Info("Log path: %s", setting.LogRootPath) | 	log.Info("Log path: %s", setting.LogRootPath) | ||||||
|  | 	log.Info("Configuration file: %s", setting.CustomConf) | ||||||
| 	setting.InitDBConfig() | 	setting.InitDBConfig() | ||||||
|  |  | ||||||
| 	var ( | 	var ( | ||||||
|   | |||||||
| @@ -32,6 +32,7 @@ func runMigrate(ctx *cli.Context) error { | |||||||
| 	log.Info("AppWorkPath: %s", setting.AppWorkPath) | 	log.Info("AppWorkPath: %s", setting.AppWorkPath) | ||||||
| 	log.Info("Custom path: %s", setting.CustomPath) | 	log.Info("Custom path: %s", setting.CustomPath) | ||||||
| 	log.Info("Log path: %s", setting.LogRootPath) | 	log.Info("Log path: %s", setting.LogRootPath) | ||||||
|  | 	log.Info("Configuration file: %s", setting.CustomConf) | ||||||
| 	setting.InitDBConfig() | 	setting.InitDBConfig() | ||||||
|  |  | ||||||
| 	if err := models.NewEngine(context.Background(), migrations.Migrate); err != nil { | 	if err := models.NewEngine(context.Background(), migrations.Migrate); err != nil { | ||||||
|   | |||||||
| @@ -114,6 +114,7 @@ func runMigrateStorage(ctx *cli.Context) error { | |||||||
| 	log.Info("AppWorkPath: %s", setting.AppWorkPath) | 	log.Info("AppWorkPath: %s", setting.AppWorkPath) | ||||||
| 	log.Info("Custom path: %s", setting.CustomPath) | 	log.Info("Custom path: %s", setting.CustomPath) | ||||||
| 	log.Info("Log path: %s", setting.LogRootPath) | 	log.Info("Log path: %s", setting.LogRootPath) | ||||||
|  | 	log.Info("Configuration file: %s", setting.CustomConf) | ||||||
| 	setting.InitDBConfig() | 	setting.InitDBConfig() | ||||||
|  |  | ||||||
| 	if err := models.NewEngine(context.Background(), migrations.Migrate); err != nil { | 	if err := models.NewEngine(context.Background(), migrations.Migrate); err != nil { | ||||||
|   | |||||||
| @@ -81,6 +81,7 @@ func GlobalInit(ctx context.Context) { | |||||||
| 	log.Info("AppWorkPath: %s", setting.AppWorkPath) | 	log.Info("AppWorkPath: %s", setting.AppWorkPath) | ||||||
| 	log.Info("Custom path: %s", setting.CustomPath) | 	log.Info("Custom path: %s", setting.CustomPath) | ||||||
| 	log.Info("Log path: %s", setting.LogRootPath) | 	log.Info("Log path: %s", setting.LogRootPath) | ||||||
|  | 	log.Info("Configuration file: %s", setting.CustomConf) | ||||||
| 	log.Info("Run Mode: %s", strings.Title(setting.RunMode)) | 	log.Info("Run Mode: %s", strings.Title(setting.RunMode)) | ||||||
|  |  | ||||||
| 	// Setup i18n | 	// Setup i18n | ||||||
|   | |||||||
| @@ -22,6 +22,7 @@ func PreloadSettings(ctx context.Context) bool { | |||||||
| 		log.Info("AppWorkPath: %s", setting.AppWorkPath) | 		log.Info("AppWorkPath: %s", setting.AppWorkPath) | ||||||
| 		log.Info("Custom path: %s", setting.CustomPath) | 		log.Info("Custom path: %s", setting.CustomPath) | ||||||
| 		log.Info("Log path: %s", setting.LogRootPath) | 		log.Info("Log path: %s", setting.LogRootPath) | ||||||
|  | 		log.Info("Configuration file: %s", setting.CustomConf) | ||||||
| 		log.Info("Preparing to run install page") | 		log.Info("Preparing to run install page") | ||||||
| 		translation.InitLocales() | 		translation.InitLocales() | ||||||
| 		if setting.EnableSQLite3 { | 		if setting.EnableSQLite3 { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user