diff --git a/internal/logic/admin/system/getNodeConfigLogic.go b/internal/logic/admin/system/getNodeConfigLogic.go index 1212b1a..6037aa9 100644 --- a/internal/logic/admin/system/getNodeConfigLogic.go +++ b/internal/logic/admin/system/getNodeConfigLogic.go @@ -3,6 +3,7 @@ package system import ( "context" "encoding/json" + "github.com/perfect-panel/server/internal/config" "github.com/perfect-panel/server/internal/svc" "github.com/perfect-panel/server/internal/types" diff --git a/pkg/logger/gorm.go b/pkg/logger/gorm.go index 7dbdd4a..c7a295d 100644 --- a/pkg/logger/gorm.go +++ b/pkg/logger/gorm.go @@ -32,15 +32,15 @@ func (l *GormLogger) LogMode(logger.LogLevel) logger.Interface { } func (l *GormLogger) Info(ctx context.Context, str string, args ...interface{}) { - WithContext(ctx).WithCallerSkip(6).Infof("%s Info: %s", TAG, str, args) + WithContext(ctx).WithCallerSkip(2).Infof("%s Info: %s", TAG, str, args) } func (l *GormLogger) Warn(ctx context.Context, str string, args ...interface{}) { - WithContext(ctx).WithCallerSkip(6).Infof("%s Warn: %s", TAG, str, args) + WithContext(ctx).WithCallerSkip(2).Infof("%s Warn: %s", TAG, str, args) } func (l *GormLogger) Error(ctx context.Context, str string, args ...interface{}) { - WithContext(ctx).WithCallerSkip(6).Errorf("%s Error: %s", TAG, str, args) + WithContext(ctx).WithCallerSkip(2).Errorf("%s Error: %s", TAG, str, args) } func (l *GormLogger) Trace(ctx context.Context, begin time.Time, fc func() (sql string, rowsAffected int64), err error) {