mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
MM-28419: Move SetLogger() to Server. (#15551)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
//
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user