We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 02fe9d1 commit 86f0d70Copy full SHA for 86f0d70
cloudinit/log.py
@@ -24,6 +24,7 @@
24
import logging.handlers
25
import logging.config
26
27
+import collections
28
import os
29
import sys
30
@@ -63,9 +64,11 @@ def setupLogging(cfg=None):
63
64
# If there is a 'logcfg' entry in the config,
65
# respect it, it is the old keyname
66
log_cfgs.append(str(log_cfg))
- elif "log_cfgs" in cfg and isinstance(cfg['log_cfgs'], (set, list)):
67
+ elif "log_cfgs" in cfg:
68
for a_cfg in cfg['log_cfgs']:
- if isinstance(a_cfg, (list, set, dict)):
69
+ if isinstance(a_cfg, (basestring, str)):
70
+ log_cfgs.append(a_cfg)
71
+ elif isinstance(a_cfg, (collections.Iterable)):
72
cfg_str = [str(c) for c in a_cfg]
73
log_cfgs.append('\n'.join(cfg_str))
74
else:
0 commit comments