summaryrefslogtreecommitdiff
path: root/cloudinit/config/cc_debug.py
diff options
context:
space:
mode:
Diffstat (limited to 'cloudinit/config/cc_debug.py')
-rw-r--r--cloudinit/config/cc_debug.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/cloudinit/config/cc_debug.py b/cloudinit/config/cc_debug.py
index 2705035b..8c489426 100644
--- a/cloudinit/config/cc_debug.py
+++ b/cloudinit/config/cc_debug.py
@@ -14,6 +14,25 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+"""
+**Summary:** helper to debug cloud-init *internal* datastructures.
+
+**Description:** This module will enable for outputting various internal
+information that cloud-init sources provide to either a file or to the output
+console/log location that this cloud-init has been configured with when
+running.
+
+It can be configured with the following option structure::
+
+ debug:
+ verbose: (defaulting to true)
+ output: (location to write output, defaulting to console + log)
+
+.. note::
+
+ Log configurations are not output.
+"""
+
import copy
from StringIO import StringIO
@@ -40,6 +59,8 @@ def _dumps(obj):
def handle(name, cfg, cloud, log, args):
+ """Handler method activated by cloud-init."""
+
verbose = util.get_cfg_by_path(cfg, ('debug', 'verbose'), default=True)
if args:
# if args are provided (from cmdline) then explicitly set verbose