Skip to content

Commit

Permalink
Add example for AdvancedLoggingJSON via env variables (#7097)
Browse files Browse the repository at this point in the history
Co-authored-by: Carrie Warner (Mattermost) <74422101+cwarnermm@users.noreply.github.com>
  • Loading branch information
hanzei and cwarnermm authored May 6, 2024
1 parent 6e55996 commit 4dbf48f
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions source/manage/logging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -485,3 +485,30 @@ How do I adjust the maximum log field size?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

See :ref:`maximum-field-size <configure/environment-configuration-settings:maximum field size>`

How can I configure Advanced logging via environment variables?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The ``MM_LOGSETTINGS_ADVANCEDLOGGINGJSON`` environment variable is used to configure Advanced logging . You can use ``jq`` to generate the JSON payload, e.g.

.. code-block:: shell
export MM_LOGSETTINGS_ADVANCEDLOGGINGJSON=$(jq -n -c '{
"console1": {
"Type": "console",
"Format": "json",
"Levels": [
{"ID": 5, "Name": "debug", "Stacktrace": false},
{"ID": 4, "Name": "info", "Stacktrace": false, "color": 36},
{"ID": 3, "Name": "warn", "Stacktrace": false},
{"ID": 2, "Name": "error", "Stacktrace": true, "color": 31},
{"ID": 1, "Name": "fatal", "Stacktrace": true, "color": 31},
{"ID": 0, "Name": "panic", "Stacktrace": true, "color": 31},
{"ID": 10, "Name": "stdlog", "Stacktrace": false}
],
"Options": {
"Out": "stdout"
},
"MaxQueueSize": 1000
}
}')

0 comments on commit 4dbf48f

Please sign in to comment.