diff options
author | Scott Moser <smoser@ubuntu.com> | 2011-02-17 15:48:41 -0500 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2011-02-17 15:48:41 -0500 |
commit | 6fe51bb797810832de4301f85b5b3ca11630e108 (patch) | |
tree | 95b494d8bf677a813f0d53365b02ae46fca22035 /config/cloud.cfg.d | |
parent | e285b1614b00c5689ac71ec9afcfa83d996b22c0 (diff) | |
download | vyos-cloud-init-6fe51bb797810832de4301f85b5b3ca11630e108.tar.gz vyos-cloud-init-6fe51bb797810832de4301f85b5b3ca11630e108.zip |
change from yaml+'#include' to yaml + config.d format for cloud.cfg
Diffstat (limited to 'config/cloud.cfg.d')
-rw-r--r-- | config/cloud.cfg.d/05_logging.cfg | 57 | ||||
-rw-r--r-- | config/cloud.cfg.d/README | 3 |
2 files changed, 60 insertions, 0 deletions
diff --git a/config/cloud.cfg.d/05_logging.cfg b/config/cloud.cfg.d/05_logging.cfg new file mode 100644 index 00000000..2e7ac2ed --- /dev/null +++ b/config/cloud.cfg.d/05_logging.cfg @@ -0,0 +1,57 @@ +## this yaml formated config file handles setting +## logger information. The values that are necessary to be set +## are seen at the bottom. The top '_log' are only used to remove +## redundency in a syslog and fallback-to-file case. +## +## The 'log_cfgs' entry defines a list of logger configs +## Each entry in the list is tried, and the first one that +## works is used. If a log_cfg list entry is an array, it will +## be joined with '\n'. +_log: + - &log_base | + [loggers] + keys=root,cloudinit + + [handlers] + keys=consoleHandler,cloudLogHandler + + [formatters] + keys=simpleFormatter,arg0Formatter + + [logger_root] + level=DEBUG + handlers=consoleHandler,cloudLogHandler + + [logger_cloudinit] + level=DEBUG + qualname=cloudinit + handlers= + propagate=1 + + [handler_consoleHandler] + class=StreamHandler + level=WARNING + formatter=arg0Formatter + args=(sys.stderr,) + + [formatter_arg0Formatter] + format=%(asctime)s - %(filename)s[%(levelname)s]: %(message)s + + [formatter_simpleFormatter] + format=[CLOUDINIT] %(filename)s[%(levelname)s]: %(message)s + - &log_file | + [handler_cloudLogHandler] + class=FileHandler + level=DEBUG + formatter=arg0Formatter + args=('/var/log/cloud-init.log',) + - &log_syslog | + [handler_cloudLogHandler] + class=handlers.SysLogHandler + level=DEBUG + formatter=simpleFormatter + args=("/dev/log", handlers.SysLogHandler.LOG_USER) + +log_cfgs: + - [ *log_base, *log_syslog ] + - [ *log_base, *log_file ] diff --git a/config/cloud.cfg.d/README b/config/cloud.cfg.d/README new file mode 100644 index 00000000..60702e9d --- /dev/null +++ b/config/cloud.cfg.d/README @@ -0,0 +1,3 @@ +# All files in this directory will be read by cloud-init +# They are read in lexical order. Later files overwrite values in +# earlier files. |