Backport logger changes from EE
Backport logger changes from EE

This resolves the issues identified in https://gitlab.com/gitlab-org/gitlab-ee/-/jobs/81699184.

dreampet/gitlab,jirutka/gitlabhq,iiet/iiet-git,dreampet/gitlab,stoplightio/gitlabhq,axilleas/gitlabhq,dreampet/gitlab,jirutka/gitlabhq,mmkassem/gitlabhq,jirutka/gitlabhq,stoplightio/gitlabhq,mmkassem/gitlabhq,iiet/iiet-git,iiet/iiet-git,mmkassem/gitlabhq,jirutka/gitlabhq,iiet/iiet-git,dreampet/gitlab,stoplightio/gitlabhq,axilleas/gitlabhq,stoplightio/gitlabhq,axilleas/gitlabhq,axilleas/gitlabhq,mmkassem/gitlabhq