Search code examples
dreamfactory

Why DreamFactory 2.1.1 LOG_LEVEL .env parameter is ignored?


Since i've upgraded my Dreamfactory DSP from 2.0.2 to 2.1.1-2 , some configuration's parameters seems to be ignored!

DF_LOG_LEVEL is one of them and even if i change it, the value stay to WARNING as defined as the default value in the config/df.php

here is a part of my .env file:

##------------------------------------------------------------------------------
## DreamFactory Settings
##------------------------------------------------------------------------------

## LOG Level. This is hierarchical and goes in the following order.
## DEBUG -> INFO -> NOTICE -> WARNING -> ERROR -> CRITICAL -> ALERT -> EMERGENCY
## If you set log level to WARNING then all WARNING, ERROR, CRITICAL, ALERT, and EMERGENCY
## will be logged. Setting log level to DEBUG will log everything. Default is WARNING.
DF_LOG_LEVEL=DEBUG

(I've check that there is no other line in my .env file about the LOG_LEVEL)

Here is the config/df.php section about LOG_LEVEL: (where default is WARNING)

'version'                      => '2.1.1',
// General API version number, 1.x was earlier product and may be supported by most services
'api_version'                  => '2.0',
// Name of this DreamFactory instance. Defaults to server name.
'instance_name'                => env('DF_INSTANCE_NAME', gethostname()),
// Log level
'log_level'                    => env('DF_LOG_LEVEL', 'WARNING'),

When i change the DF_LOG_LEVEL to other value in my .env file, Even after restarting my server nothing change in my Log file and in the Admin section Config/System Info i still have:

DreamFactory Instance

Admin Application Version: 2.1.5

DreamFactory Version: 2.1.1

System Database: mysql

Install Path: /opt/df2/apps/dreamfactory/htdocs/

Log Path: /opt/df2/apps/dreamfactory/htdocs/storage/logs/

Log Mode: single

Log Level: WARNING

I have noticed the same trouble with other parameters like the DF_ALLOW_FOREVER_SESSIONS=true That is also no more effective !

Any help or suggestion ?


Solution

  • After making changes to the .env file in DreamFactory it is recommended to issue the following commands for the changes to be read from .env file (from htdocs folder or DF2 installation directory):

    php artisan config:clear

    php artisan cache:clear