Warning: You are browsing the documentation for version 3.3 which is not maintained anymore.
If some of your projects are still using this version, consider upgrading.
In Symfony versions prior to 3.3, the Console component didn't provide any logging capabilities out of the box and you had to implement your own exception listener for the console.
Starting from Symfony 3.3, the Console component provides automatic error and exception logging.
You can of course also access and use the logger service to log messages.