![]() |
Is there a way to have a numerically-indexed array in a .env file? My use-case is the configuration app/Config/Logger.php: you can setup the $threshold variable as a number or, since relatively recently, an array. The number indicates to log requests of that level or less, e.g.
PHP Code: public $threshold = 3; // log requests of levels 1, 2 and 3. PHP Code: public $threshold = [1, 2, 3, 8]; PHP Code: $threshold = 8; It would be ideal if I could set this somehow on my .env file, so as not to have to modify the app/Config/Logger.php file, which is committed to git, every time I want to debug stuff. This way, my setup shows debug messages, but others like testing or production don't. I've tried putting this into my .env, but it does not work, PHP Code: logger.threshold.0 = 1 PHP Code: logger.threshold = '[1, 2, 3, 8]' |
Messages In This Thread |
Using numerically indexed arrays in .env file - by adrianovaroli - 02-02-2024, 11:26 AM
RE: Using numerically indexed arrays in .env file - by kenjis - 02-02-2024, 06:57 PM
RE: Using numerically indexed arrays in .env file - by adrianovaroli - 02-03-2024, 06:07 AM
RE: Using numerically indexed arrays in .env file - by kenjis - 02-03-2024, 05:14 PM
RE: Using numerically indexed arrays in .env file - by kenjis - 02-03-2024, 05:17 PM
RE: Using numerically indexed arrays in .env file - by adrianovaroli - 02-04-2024, 06:39 AM
RE: Using numerically indexed arrays in .env file - by pippuccio76 - 03-12-2025, 01:58 AM
RE: Using numerically indexed arrays in .env file - by grimpirate - 03-16-2025, 01:57 PM
RE: Using numerically indexed arrays in .env file - by pippuccio76 - 03-17-2025, 01:49 AM
RE: Using numerically indexed arrays in .env file - by grimpirate - 03-17-2025, 08:29 PM
RE: Using numerically indexed arrays in .env file - by beifeng111 - 04-15-2025, 01:22 AM
|