mirror of
				https://github.com/clearml/clearml
				synced 2025-06-26 18:16:07 +00:00 
			
		
		
		
	Use deepcopy since Python's logging infrastructure might modify the dict
This commit is contained in:
		
							parent
							
								
									e7d0f7eca1
								
							
						
					
					
						commit
						56db3c67e7
					
				| @ -1,4 +1,5 @@ | |||||||
| import logging.config | import logging.config | ||||||
|  | from copy import deepcopy | ||||||
| 
 | 
 | ||||||
| from pathlib2 import Path | from pathlib2 import Path | ||||||
| 
 | 
 | ||||||
| @ -27,4 +28,5 @@ def initialize(logging_config=None, extra=None): | |||||||
|         Logger.manager.loggerClass = _Logger |         Logger.manager.loggerClass = _Logger | ||||||
| 
 | 
 | ||||||
|     if logging_config is not None: |     if logging_config is not None: | ||||||
|         logging.config.dictConfig(dict(logging_config)) |         # Use deepcopy since Python's logging infrastructure might modify the dict | ||||||
|  |         logging.config.dictConfig(deepcopy(dict(logging_config))) | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 allegroai
						allegroai