Need a logger instance without through the container

Hi there,

I’m sorry to say this but I’m sick and tire of getting a logger like this in every class.
public function __construct(ContainerInterface $c) {
$this->logger = $c[‘logger’];
}

It’s just a logger. grrrrr…
I think injecting business logic/classes are fine but it’s way too much to inject just a logger.

Now my question is how can I define a Logger globally in Slim3 ?

Cheers,
Wolfgang.

The way I do it is, I define an abstract ‘Controller’-class, that does the fetching of the logger (and/or other injectables), and I extend that class for the real controllers.