You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This setting allows you to specify the image backend to use for image processing tasks. By default, the image driver is
97
-
not set and an error will be thrown if you try to perform any image related task. You can change this to `IMAGICK`, `GD`
98
-
or `VIPS` if you prefer, just make sure to have the required extensions installed.
99
+
set to `VIPS`. You can change this to `IMAGICK`, `GD` or `VIPS` if you prefer, just make sure to have the required extensions installed.
99
100
100
101
```php
101
102
use Codewithkyrian\Transformers\Utils\ImageDriver;
@@ -105,6 +106,24 @@ Transformers::setup()
105
106
->apply();
106
107
```
107
108
109
+
### `setLogger(LoggerInterface $logger)`
110
+
111
+
This setting allows you to specify a PSR-3 compatible logger for TransformersPHP. The library will log various events such as model loading, generation progress, warnings, and errors. If no logger is set, a `NullLogger` will be used by default, which discards all log messages.
112
+
113
+
```php
114
+
use Psr\Log\LoggerInterface;
115
+
use Monolog\Logger;
116
+
use Monolog\Handler\StreamHandler;
117
+
118
+
// Create a logger instance (example using Monolog)
0 commit comments