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

5 2 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x