By default, logs are written to the file
var/logs/app.log. The file path can be changed in config/config.php. You can also change the log storage to a database or something else by changing the App\Infrastructure\LoggerFactory. For the logger to work, a dependency must be added to the config/container.php.
Psr\Log\LoggerInterface::class => fn() => new App\Infrastructure\LoggerFactory(),