Commit f38ee21
committed
convert argument
FluentRecordFormatter is expecting fmt to be either a callable or a dict. But there is no strict type checking is done to check whether the variable is dict or not.
There are many situations in which `fmt` can have a string value.
For eg: if logger is loading configuration from a config file using [ConfigParser](https://docs.python.org/2/library/configparser.html) , then there is no way to specify a dict inside the config file.
This change is backward compatible from Python2.7 to Python3.8 since `ast.literal_eval` will work in same way since python 2.6+
Signed-off-by: Harish Karumuthil <harish2704@gmail.com>fmt into dict if argument is a string1 parent d1b81ba commit f38ee21
1 file changed
+3
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
82 | 85 | | |
83 | 86 | | |
84 | 87 | | |
| |||
0 commit comments