Can I use logging with automatic dependency assembly?
Is the benefit of automatic dependency assembly just saving a few lines of code in Application.php?
Working on my first app and I’m a bit confused on the container. Reading the doc, I understand the benefit of managing dependencies centrally in “appname/lib/AppInfo/Application.php”.
But then… section “Use automatic dependency assembly (recommended)” tells me NOT to create an Application.php file. If the controllers, services and mappers are coded correctly, all the dependencies will be built for me. So I remove the Application.php.
But then… the logging sections says I need to use the ServerContainer to get logging working.
It’s not clear if there is a hybrid option where automatic dependency assembly works where it can, but you have to explicitely code the dependencies.
As a newbie, I’m going to go back and explicitely code the dependencies until I have a good understanding of the ServerContainer, then I’ll optimize with “automatic dependency assembly”. Though sometimes, I’m in favor of a bit more coding, if it makes the code easier to follow for a new person.