@tassoman opened this Issue on November 29th 2017 Contributor

Ciao!
I'm updating an old plugin born while Piwik was 1.x. It flawless worked inside Piwik 2.x but now must be updated.

I've started from scratch generating plugin's parts using console generator. Now I have a custom Dimension, I'm on its development and I'm trying to log things inside plugins/ThePlugin/Columns/ColumnName.php onNewVisit method.

Piwik 3.x Logging documentation suggests to log using StaticContainer::getContainer()->get('Psr\Log\LoggerInterface') (as 2.X docs said before) but inside PHPStorm that stuff pops up as deprecated.
While I was reading StaticContainer source code I found a note: in 3.X release will be removed.

  • looks like isn't removed yet
  • there's no indication how to use DI instead
  • 3.X documentation seems inconsistent

Any help and suggestion how to get rid of StaticContainer and using real DI is appreciated 😸
Best regards, thank you

Powered by GitHub Issue Mirror