DOCS add import to upgrade example

This commit is contained in:
Daniel Hensby 2017-11-08 14:56:13 +00:00
parent 079fffb0f0
commit 3cd0b23172
No known key found for this signature in database
GPG Key ID: B00D1E9767F0B06E

View File

@ -487,6 +487,7 @@ For instance, code which logs errors should be upgraded as below:
```diff
-SS_Log::log('My error message', SS_Log::ERR);
+use Psr\Log\LoggerInterface;
+use SilverStripe\Core\Injector\Injector;
+Injector::inst()->get(LoggerInterface::class)->error('My error message');
```