From 838b7474f77fb8ca6ca234ecda518e35b5ca91a0 Mon Sep 17 00:00:00 2001 From: Kevin Clark Date: Tue, 14 Dec 2021 16:43:32 -0800 Subject: [PATCH] Changed default Logs.Collect value from False/n to True/y (#2436) --- README.md | 6 ++++-- azurelinuxagent/common/conf.py | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 61ba98f78..c69f43e6a 100644 --- a/README.md +++ b/README.md @@ -195,7 +195,7 @@ ResourceDisk.EnableSwap=n ResourceDisk.EnableSwapEncryption=n ResourceDisk.SwapSizeMB=0 Logs.Verbose=n -Logs.Collect=n +Logs.Collect=y Logs.CollectPeriod=3600 OS.AllowHTTP=n OS.RootDeviceScsiTimeout=300 @@ -461,10 +461,12 @@ leverages the system logrotate functionality to rotate logs. #### __Logs.Collect__ _Type: Boolean_ -_Default: n_ +_Default: y_ If set, agent logs will be periodically collected and uploaded to a secure location for improved supportability. +NOTE: This feature is only supported ubuntu 16.04+; this flag will not take effect on any other distro. + #### __Logs.CollectPeriod__ _Type: Integer_ diff --git a/azurelinuxagent/common/conf.py b/azurelinuxagent/common/conf.py index 729365289..87c4aaa98 100644 --- a/azurelinuxagent/common/conf.py +++ b/azurelinuxagent/common/conf.py @@ -115,7 +115,7 @@ def load_conf_from_file(conf_file_path, conf=__conf__): "OS.CheckRdmaDriver": False, "Logs.Verbose": False, "Logs.Console": True, - "Logs.Collect": False, + "Logs.Collect": True, "Extensions.Enabled": True, "Provisioning.AllowResetSysUser": False, "Provisioning.RegenerateSshHostKeyPair": False, @@ -262,7 +262,7 @@ def get_logs_console(conf=__conf__): def get_collect_logs(conf=__conf__): - return conf.get_switch("Logs.Collect", False) + return conf.get_switch("Logs.Collect", True) def get_collect_logs_period(conf=__conf__):