MM-28419: Move SetLogger() to Server. (#15551)

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
This commit is contained in:
George Goldberg
2020-09-29 14:30:15 +01:00
committed by GitHub
parent c298678663
commit 61f08d397c
4 changed files with 4 additions and 22 deletions

View File

@@ -677,8 +677,3 @@ func (a *App) SetServer(srv *Server) {
func (a *App) GetT() goi18n.TranslateFunc {
return a.t
}
// TODO: change this to make a server method.
func (a *App) SetLog(l *mlog.Logger) {
a.srv.Log = l
}

View File

@@ -296,8 +296,6 @@ type AppIface interface {
// the member's group memberships and the configuration of those groups to the syncable. This method should only
// be invoked on group-synced (aka group-constrained) syncables.
SyncSyncableRoles(syncableID string, syncableType model.GroupSyncableType) *model.AppError
// TODO: change this to make a server method.
SetLog(l *mlog.Logger)
// TeamMembersMinusGroupMembers returns the set of users on the given team minus the set of users in the given
// groups.
//

View File

@@ -13289,21 +13289,6 @@ func (a *OpenTracingAppLayer) SetDefaultProfileImage(user *model.User) *model.Ap
return resultVar0
}
func (a *OpenTracingAppLayer) SetLog(l *mlog.Logger) {
origCtx := a.ctx
span, newCtx := tracing.StartSpanWithParentByContext(a.ctx, "app.SetLog")
a.ctx = newCtx
a.app.Srv().Store.SetContext(newCtx)
defer func() {
a.app.Srv().Store.SetContext(origCtx)
a.ctx = origCtx
}()
defer span.Finish()
a.app.SetLog(l)
}
func (a *OpenTracingAppLayer) SetPhase2PermissionsMigrationStatus(isComplete bool) error {
origCtx := a.ctx
span, newCtx := tracing.StartSpanWithParentByContext(a.ctx, "app.SetPhase2PermissionsMigrationStatus")

View File

@@ -1538,3 +1538,7 @@ func (s *Server) TelemetryId() string {
func (s *Server) HttpService() httpservice.HTTPService {
return s.HTTPService
}
func (s *Server) SetLog(l *mlog.Logger) {
s.Log = l
}