From 2d1b69d4f238480628786725076475fe8a5beac8 Mon Sep 17 00:00:00 2001 From: Emre Berk Kaya <75899391+emrberk@users.noreply.github.com> Date: Tue, 4 Jun 2024 11:50:06 +0300 Subject: [PATCH] Add JSON logging instructions [MC-2844] (#327) * Add JSON logging instructions [MC-2844] * add a note about json templates * Update docs/modules/deploy-manage/pages/logging.adoc Co-authored-by: rebekah-lawrence <142301480+rebekah-lawrence@users.noreply.github.com> * remove OOTB --------- Co-authored-by: rebekah-lawrence <142301480+rebekah-lawrence@users.noreply.github.com> --- docs/modules/deploy-manage/pages/logging.adoc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/modules/deploy-manage/pages/logging.adoc b/docs/modules/deploy-manage/pages/logging.adoc index 616fcbcc..29d45c1d 100644 --- a/docs/modules/deploy-manage/pages/logging.adoc +++ b/docs/modules/deploy-manage/pages/logging.adoc @@ -71,6 +71,19 @@ rootLogger.appenderRef.stdout.ref=STDOUT rootLogger.appenderRef.rolling.ref=RollingFile ---- +To enable JSON logging, you can activate `json-logging` profile by starting Management Center with the following parameter: +---- +-Dspring.profiles.active=json-logging +---- +By default, Management Center uses a JSON logging template compliant with link:https://www.elastic.co/guide/en/ecs/current/ecs-reference.html[Elastic Common Schema (ECS) specification]. +You can change the logging template by providing a JSON logging template file as follows: +---- +-Dlogging.json.template= +---- +NOTE: To use a custom JSON logging template, you must activate the `json-logging` profile as described above. + +For more information about the JSON logging templates, see the link:https://logging.apache.org/log4j/2.x/manual/json-template-layout.html[Log4j2 JSON Layout documentation]. + == Audit Logging To make it easier to examine suspicious activity and troubleshoot issues, you can use audit logging to keep a record of events that happen in Management Center such as user logins.