Skip to content

Commit 04b233e

Browse files
authored
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 <[email protected]>
1 parent 8af7a21 commit 04b233e

File tree

6 files changed

+6
-0
lines changed

6 files changed

+6
-0
lines changed

cmd/convert.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ func runConvert(ctx *cli.Context) error {
3131
log.Info("AppWorkPath: %s", setting.AppWorkPath)
3232
log.Info("Custom path: %s", setting.CustomPath)
3333
log.Info("Log path: %s", setting.LogRootPath)
34+
log.Info("Configuration file: %s", setting.CustomConf)
3435
setting.InitDBConfig()
3536

3637
if !setting.Database.UseMySQL {

cmd/dump_repo.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ func runDumpRepository(ctx *cli.Context) error {
8484
log.Info("AppWorkPath: %s", setting.AppWorkPath)
8585
log.Info("Custom path: %s", setting.CustomPath)
8686
log.Info("Log path: %s", setting.LogRootPath)
87+
log.Info("Configuration file: %s", setting.CustomConf)
8788
setting.InitDBConfig()
8889

8990
var (

cmd/migrate.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ func runMigrate(ctx *cli.Context) error {
3232
log.Info("AppWorkPath: %s", setting.AppWorkPath)
3333
log.Info("Custom path: %s", setting.CustomPath)
3434
log.Info("Log path: %s", setting.LogRootPath)
35+
log.Info("Configuration file: %s", setting.CustomConf)
3536
setting.InitDBConfig()
3637

3738
if err := models.NewEngine(context.Background(), migrations.Migrate); err != nil {

cmd/migrate_storage.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ func runMigrateStorage(ctx *cli.Context) error {
114114
log.Info("AppWorkPath: %s", setting.AppWorkPath)
115115
log.Info("Custom path: %s", setting.CustomPath)
116116
log.Info("Log path: %s", setting.LogRootPath)
117+
log.Info("Configuration file: %s", setting.CustomConf)
117118
setting.InitDBConfig()
118119

119120
if err := models.NewEngine(context.Background(), migrations.Migrate); err != nil {

routers/init.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ func GlobalInit(ctx context.Context) {
8181
log.Info("AppWorkPath: %s", setting.AppWorkPath)
8282
log.Info("Custom path: %s", setting.CustomPath)
8383
log.Info("Log path: %s", setting.LogRootPath)
84+
log.Info("Configuration file: %s", setting.CustomConf)
8485
log.Info("Run Mode: %s", strings.Title(setting.RunMode))
8586

8687
// Setup i18n

routers/install/setting.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ func PreloadSettings(ctx context.Context) bool {
2222
log.Info("AppWorkPath: %s", setting.AppWorkPath)
2323
log.Info("Custom path: %s", setting.CustomPath)
2424
log.Info("Log path: %s", setting.LogRootPath)
25+
log.Info("Configuration file: %s", setting.CustomConf)
2526
log.Info("Preparing to run install page")
2627
translation.InitLocales()
2728
if setting.EnableSQLite3 {

0 commit comments

Comments
 (0)