Currently if you search google for "liferay log4j" you get an ancient result pointing here: https://web.liferay.com/community/wiki/-/wiki/Main/How+to+configure+the+logs+in+Liferay. That content is out-of-date and although technically you can still use it, either by manually placing a portal-log4j-ext.xml file in the right location or by using ext, there's a better way.
DXP introduced the ability to add a src/main/resources/META-INF/module-log4j.xml file to any module using the extender pattern. For example, adding this module-log4j.xml will crank up logging on the export/import-related classes. This can be hugely useful when monitoring or diagnosing problems with publishing or LAR export/imports.
A different way would be to add: