mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
DOCS add import to upgrade example
This commit is contained in:
parent
079fffb0f0
commit
3cd0b23172
@ -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');
|
||||
```
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user