Disable color debug log by default

Change-Id: I632c59e885835da6c8428abad5ef1d33d8406abb
Related: PROD-28528(PROD:28528)
diff --git a/README.rst b/README.rst
index 863a0f6..bc7e03b 100644
--- a/README.rst
+++ b/README.rst
@@ -175,6 +175,16 @@
             - 25 at 23:45
             - hourly
 
+Enable color for debug logs
+
+.. code-block:: yaml
+
+    backupninja:
+      client:
+        enabled: true
+        log:
+          color: true
+
 If multiple "when" options are present, then they all apply. If two configurations files are scheduled to run in the same hour, then we fall back on the alphabetical ordering specified above.
 
 
diff --git a/backupninja/files/backupninja.conf b/backupninja/files/backupninja.conf
index 634cb37..3ba5044 100644
--- a/backupninja/files/backupninja.conf
+++ b/backupninja/files/backupninja.conf
@@ -39,4 +39,4 @@
 scriptdirectory = /usr/share/backupninja
 
 # use colors in the log file
-usecolors = yes
+usecolors = {{ 'yes' if client.get('log', {}).get('color', False) else 'no' }}
diff --git a/tests/pillar/client_rsync.sls b/tests/pillar/client_rsync.sls
index 49206d7..1f2a2ad 100644
--- a/tests/pillar/client_rsync.sls
+++ b/tests/pillar/client_rsync.sls
@@ -1,5 +1,7 @@
 backupninja:
   client:
+    log:
+      color: false
     enabled: true
     target:
       engine: rsync
@@ -8,4 +10,4 @@
 linux:
   system:
     name: hostname
-    domain: domain
\ No newline at end of file
+    domain: domain
diff --git a/tests/pillar/client_rsync_backup_times.sls b/tests/pillar/client_rsync_backup_times.sls
index adb5a78..d0b3524 100644
--- a/tests/pillar/client_rsync_backup_times.sls
+++ b/tests/pillar/client_rsync_backup_times.sls
@@ -1,5 +1,7 @@
 backupninja:
   client:
+    log:
+      color: true
     enabled: true
     backup_times:
       day_of_week: 1
@@ -12,4 +14,4 @@
 linux:
   system:
     name: hostname
-    domain: domain
\ No newline at end of file
+    domain: domain