Merge ~pjdc/charm-k8s-mattermost/+git/charm-k8s-mattermost:logging into charm-k8s-mattermost:master

Proposed by Paul Collins
Status: Merged
Approved by: Paul Collins
Approved revision: e57910aa3a750d85ed3c06f241dfa12644609f99
Merged at revision: 438a6ee97ac61c14e811b689f17f38d3efc31bc0
Proposed branch: ~pjdc/charm-k8s-mattermost/+git/charm-k8s-mattermost:logging
Merge into: charm-k8s-mattermost:master
Diff against target: 28 lines (+8/-0)
2 files modified
config.yaml (+4/-0)
src/charm.py (+4/-0)
Reviewer Review Type Date Requested Status
Stuart Bishop (community) Approve
Mattermost Charmers Pending
Review via email: mp+384602@code.launchpad.net

Commit message

configure logging via the pod spec, add "debug" setting

To post a comment you must log in.
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
Stuart Bishop (stub) wrote :

Yup

review: Approve
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision 438a6ee97ac61c14e811b689f17f38d3efc31bc0

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/config.yaml b/config.yaml
2index 1bb6bca..985f777 100644
3--- a/config.yaml
4+++ b/config.yaml
5@@ -1,4 +1,8 @@
6 options:
7+ debug:
8+ type: boolean
9+ description: Set the Mattermost log level to DEBUG, otherwise INFO.
10+ default: false
11 open_server:
12 type: boolean
13 description: Allows users to sign up from the root page without an invite
14diff --git a/src/charm.py b/src/charm.py
15index 5f55abd..05e97e9 100755
16--- a/src/charm.py
17+++ b/src/charm.py
18@@ -126,6 +126,10 @@ class MattermostK8sCharm(CharmBase):
19 'MM_CONFIG': db_uri,
20 'MM_SQLSETTINGS_DATASOURCE': db_uri,
21 'MM_ENABLEOPENSERVER': config['open_server'],
22+ # logging
23+ 'MM_LOGSETTINGS_CONSOLELEVEL': 'DEBUG' if config['debug'] else 'INFO',
24+ 'MM_LOGSETTINGS_ENABLECONSOLE': 'true',
25+ 'MM_LOGSETTINGS_ENABLEFILE': 'false',
26 }
27
28 if config['site_url']:

Subscribers

People subscribed via source and target branches