Use config instead of os.environ
This commit is contained in:
		
					parent
					
						
							
								5c96f5c186
							
						
					
				
			
			
				commit
				
					
						a3dca06c35
					
				
			
		
					 1 changed files with 4 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -161,9 +161,11 @@ LOGGING = {
 | 
			
		|||
    },
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
if os.environ.get('ENABLE_DEBUG_LOG', '').strip().lower() == "true":
 | 
			
		||||
if config('ENABLE_DEBUG_LOG', default=False, cast=bool):
 | 
			
		||||
    loggers_dict = {}
 | 
			
		||||
    modules_to_log_list = os.environ.get('MODULES_TO_LOG', 'django').split(',')
 | 
			
		||||
    modules_to_log_list = config(
 | 
			
		||||
        'MODULES_TO_LOG', default='django', cast=Csv()
 | 
			
		||||
    )
 | 
			
		||||
    for custom_module in modules_to_log_list:
 | 
			
		||||
        logger_item = {
 | 
			
		||||
            custom_module: {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue