Bubka / 2FAuth

A Web app to manage your Two-Factor Authentication (2FA) accounts and generate their security codes
https://docs.2fauth.app/
GNU Affero General Public License v3.0
2.28k stars 152 forks source link

Cannot use stdout LOG_CHANNEL anymore #279

Closed dlsniper closed 10 months ago

dlsniper commented 10 months ago

Version

5.0.2

Details & Steps to reproduce

Using the container version 5.0.2, configure the environment variable LOG_CHANNEL=stdout.

Expectation

The service should start correctly.

Error & Logs

[2024-01-16 11:09:53] laravel.EMERGENCY: Unable to create configured logger. Using emergency logger. {"exception":"[object] (InvalidArgumentException(code: 0): Log [stdout] is not defined. at /srv/vendor/laravel/framework/src/Illuminate/Log/LogManager.php:212)
[stacktrace]
#0 /srv/vendor/laravel/framework/src/Illuminate/Log/LogManager.php(137): Illuminate\\Log\\LogManager->resolve()
#1 /srv/vendor/laravel/framework/src/Illuminate/Log/LogManager.php(124): Illuminate\\Log\\LogManager->get()
#2 /srv/vendor/laravel/framework/src/Illuminate/Log/LogManager.php(718): Illuminate\\Log\\LogManager->driver()
#3 /srv/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(355): Illuminate\\Log\\LogManager->debug()
#4 /srv/app/Events/ScanForNewReleaseCalled.php(21): Illuminate\\Support\\Facades\\Facade::__callStatic()
#5 /srv/app/Http/Controllers/SinglePageController.php(19): App\\Events\\ScanForNewReleaseCalled->__construct()
#6 /srv/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): App\\Http\\Controllers\\SinglePageController->index()
[...]

Execution environment

No response

Containerization

Additional information

No response

Bubka commented 10 months ago

Hi,

stdout is listed as an available log channel in env.example but it's a mistake (will remove it). Log channels actually available are defined here: https://github.com/Bubka/2FAuth/blob/master/config/logging.php#L54

Actually, I'm surprised of the title of the issue that says anymore, I don't think that ever worked at all. Have you been using it until v5?! :

dlsniper commented 10 months ago

Hello, I assumed that it used to work, based on the documentation. But, since that's not the case, then my bad for the incorrect description. Thank you for the speedy reply. And, thank you for the awesome project!

Bubka commented 10 months ago

You did well, this gave me the opportunity to update the documentation 👍🏻 thx