How do you make MyCompany/MyModuleLogger the default implementation of the LoggerInterface globally?
You are implementing a custom module MyModule, which provides an implementation of PsrLogLoggerInterface called MyCompany/MyModuleLogger. The LoggerInterface has the default preference declared in app/etc/di.xml. Keeping upgradability in mind
A. Declare a new preference for the LoggerInterface in app/code/MyCompany/MyModule/etc/frontend/di.xml
B. Declare a new preference for the LoggerInterface in MyCompany/MyModule/etc/di.xml
C. Overwrite the existing preference for the LoggerInterface in app/etc/di.xml
D. Declare a new preference for the LoggerInterface in app/code/MyCompany/MyModule/etc/global/di.xml
Explanation : To override class functionality we do it in our module and add preference in di.xml