Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elasticsearch json logging #36833

Merged
merged 75 commits into from
Jan 29, 2019
Merged
Show file tree
Hide file tree
Changes from 74 commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
3ad2a57
NodeId available on all log lines
pgomulka Dec 19, 2018
3ea4695
revert back changes due to use of json layout
pgomulka Dec 19, 2018
76b9a45
Merge branch 'master' into feature/logging-structured
pgomulka Dec 19, 2018
5593c46
remove unused improts
pgomulka Dec 19, 2018
aeb686e
cleanup in plugin
pgomulka Dec 19, 2018
fe87cc5
adding new option with clustestatelistener, pattern converter and thr…
pgomulka Dec 20, 2018
73ce302
exception handling
pgomulka Dec 27, 2018
3f838c7
json message and exception works
pgomulka Dec 27, 2018
e699d27
common wrapper layout class
pgomulka Dec 27, 2018
af54281
removed debugging code
pgomulka Dec 31, 2018
3bb69eb
passing dignity test
pgomulka Dec 31, 2018
5e1f125
fixing build
pgomulka Jan 2, 2019
18908ed
Merge branch 'master' into feature/logging-structured
pgomulka Jan 2, 2019
2c2653c
fix failing test
pgomulka Jan 2, 2019
97d2cec
fix failing test
pgomulka Jan 2, 2019
fb2f531
fix import
pgomulka Jan 2, 2019
20ee653
extending logs test
pgomulka Jan 2, 2019
55dc6eb
fix parsing and exception formatting
pgomulka Jan 3, 2019
b7ad650
fix failing test
pgomulka Jan 3, 2019
39a1ef7
fix checkstyle
pgomulka Jan 3, 2019
372207f
Merge branch 'master' into feature/logging-structured
pgomulka Jan 3, 2019
dec2024
small cleanup
pgomulka Jan 4, 2019
1da7c97
json logs cleanup
pgomulka Jan 4, 2019
4acd89d
Merge branch 'master' into feature/logging-structured
pgomulka Jan 4, 2019
28c20c1
test cleanup
pgomulka Jan 4, 2019
0686fee
sometimes HttpServerTransport is logging first, and then the server d…
pgomulka Jan 4, 2019
669e9ec
additional json tests
pgomulka Jan 9, 2019
de17fc1
docker log4j config cleanup
pgomulka Jan 10, 2019
147ca9c
incorrect docker appender ref
pgomulka Jan 10, 2019
7a2b537
the right order of reading values from clusterListener
pgomulka Jan 10, 2019
6a01097
add missing marker in a pattern
pgomulka Jan 11, 2019
0af53c0
empty lines cleanup
pgomulka Jan 11, 2019
4f8cdae
Merge branch 'master' into feature/logging-structured
pgomulka Jan 14, 2019
4aa84d7
addressing Nik's comments
pgomulka Jan 14, 2019
1d0d66a
follow up after Daniel's comments
pgomulka Jan 14, 2019
0e84d02
failing test
pgomulka Jan 14, 2019
490b56d
unused imports
pgomulka Jan 14, 2019
1119f5e
failing tests
pgomulka Jan 14, 2019
66b1420
rename test log name
pgomulka Jan 14, 2019
1f91bad
method rename
pgomulka Jan 15, 2019
7bde657
Merge branch 'master' into feature/logging-structured
pgomulka Jan 15, 2019
bcf5f85
rename name to server
pgomulka Jan 15, 2019
c7bd58a
rename revert and level corrected
pgomulka Jan 15, 2019
66c1942
wrong assertion
pgomulka Jan 15, 2019
b84cf9a
rename log name files in package tests
pgomulka Jan 15, 2019
12677cf
addressing Daniels' second round of comments
pgomulka Jan 15, 2019
5d78edf
javadocs
pgomulka Jan 16, 2019
4cbea2b
additional test verifing old config
pgomulka Jan 17, 2019
f780f74
unused import
pgomulka Jan 17, 2019
8c3c766
empty unused test
pgomulka Jan 17, 2019
c3ebfc0
small fixes after review
pgomulka Jan 18, 2019
18aca44
comment cleanup after review
pgomulka Jan 18, 2019
a4d9336
documentation and licence fix
pgomulka Jan 18, 2019
6bc7d1c
typo printted -> printed
pgomulka Jan 18, 2019
7c208c8
setOnce argument ordering
pgomulka Jan 21, 2019
a6e81fa
javadoc typo
pgomulka Jan 22, 2019
f01a4ff
refactor cluster state listeners to use setOnce
pgomulka Jan 23, 2019
53ead59
removed empty line
pgomulka Jan 23, 2019
88d1368
methods rename and cleanup
pgomulka Jan 23, 2019
72bd776
javadoc typo
pgomulka Jan 23, 2019
ee3322c
Merge pull request #7 from pgomulka/fix/observer-logging
pgomulka Jan 23, 2019
c1a4206
keep the old appenders and let the nodeIDlistener start earlier
pgomulka Jan 24, 2019
cbe83bc
Merge branch 'master' into feature/logging-structured
pgomulka Jan 24, 2019
b12f8ee
improved documentation and more robust test
pgomulka Jan 24, 2019
254d32b
Merge branch 'master' into feature/logging-structured
pgomulka Jan 24, 2019
1951e2a
split logging config in 2 for docs
pgomulka Jan 24, 2019
1502105
enable log print out for this test
pgomulka Jan 25, 2019
7eaaada
rename logs to .json
pgomulka Jan 25, 2019
1291ead
migration logging
pgomulka Jan 25, 2019
30d9675
old log rename and documentation update
pgomulka Jan 28, 2019
faa81fd
making test more stable
pgomulka Jan 28, 2019
5503ad5
doc changes after review
pgomulka Jan 28, 2019
b563423
fix doc
pgomulka Jan 28, 2019
42481b3
Merge branch 'master' into feature/logging-structured
pgomulka Jan 28, 2019
8aa18ec
Merge branch 'master' into feature/logging-structured
pgomulka Jan 28, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion distribution/archives/integ-test-zip/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ integTestRunner {
*/
if (System.getProperty("tests.rest.cluster") == null) {
systemProperty 'tests.logfile',
"${ -> integTest.nodes[0].homeDir}/logs/${ -> integTest.nodes[0].clusterName }.log"
"${ -> integTest.nodes[0].homeDir}/logs/${ -> integTest.nodes[0].clusterName }_server.json"
} else {
systemProperty 'tests.logfile', '--external--'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@

package org.elasticsearch.test.rest;

import org.elasticsearch.common.logging.NodeNameInLogsIntegTestCase;
import org.elasticsearch.common.logging.JsonLogsIntegTestCase;
import org.hamcrest.Matcher;

import java.io.IOException;
import java.io.BufferedReader;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
Expand All @@ -32,7 +32,7 @@

import static org.hamcrest.Matchers.is;

public class NodeNameInLogsIT extends NodeNameInLogsIntegTestCase {
public class JsonLogsFormatAndParseIT extends JsonLogsIntegTestCase {
@Override
protected Matcher<String> nodeNameMatcher() {
return is("node-0");
Expand All @@ -41,7 +41,7 @@ protected Matcher<String> nodeNameMatcher() {
@Override
protected BufferedReader openReader(Path logFile) {
assumeFalse("Skipping test because it is being run against an external cluster.",
logFile.getFileName().toString().equals("--external--"));
logFile.getFileName().toString().equals("--external--"));
return AccessController.doPrivileged((PrivilegedAction<BufferedReader>) () -> {
try {
return Files.newBufferedReader(logFile, StandardCharsets.UTF_8);
Expand Down
44 changes: 39 additions & 5 deletions distribution/docker/src/docker/config/log4j2.properties
Original file line number Diff line number Diff line change
@@ -1,9 +1,43 @@
status = error

appender.console.type = Console
appender.console.name = console
appender.console.layout.type = PatternLayout
appender.console.layout.pattern = [%d{ISO8601}][%-5p][%-25c{1.}] [%node_name]%marker %m%n
# log action execution errors for easier debugging
logger.action.name = org.elasticsearch.action
logger.action.level = debug

appender.rolling.type = Console
appender.rolling.name = rolling
appender.rolling.layout.type = ESJsonLayout
appender.rolling.layout.type_name = server

rootLogger.level = info
rootLogger.appenderRef.console.ref = console
rootLogger.appenderRef.rolling.ref = rolling

appender.deprecation_rolling.type = Console
appender.deprecation_rolling.name = deprecation_rolling
appender.deprecation_rolling.layout.type = ESJsonLayout
appender.deprecation_rolling.layout.type_name = deprecation

logger.deprecation.name = org.elasticsearch.deprecation
logger.deprecation.level = warn
logger.deprecation.appenderRef.deprecation_rolling.ref = deprecation_rolling
logger.deprecation.additivity = false

appender.index_search_slowlog_rolling.type = Console
appender.index_search_slowlog_rolling.name = index_search_slowlog_rolling
appender.index_search_slowlog_rolling.layout.type = ESJsonLayout
appender.index_search_slowlog_rolling.layout.type_name = index_search_slowlog

logger.index_search_slowlog_rolling.name = index.search.slowlog
logger.index_search_slowlog_rolling.level = trace
logger.index_search_slowlog_rolling.appenderRef.index_search_slowlog_rolling.ref = index_search_slowlog_rolling
logger.index_search_slowlog_rolling.additivity = false

appender.index_indexing_slowlog_rolling.type = Console
appender.index_indexing_slowlog_rolling.name = index_indexing_slowlog_rolling
appender.index_indexing_slowlog_rolling.layout.type = ESJsonLayout
appender.index_indexing_slowlog_rolling.layout.type_name = index_indexing_slowlog

logger.index_indexing_slowlog.name = index.indexing.slowlog.index
logger.index_indexing_slowlog.level = trace
logger.index_indexing_slowlog.appenderRef.index_indexing_slowlog_rolling.ref = index_indexing_slowlog_rolling
logger.index_indexing_slowlog.additivity = false
120 changes: 104 additions & 16 deletions distribution/src/config/log4j2.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ appender.console.name = console
appender.console.layout.type = PatternLayout
appender.console.layout.pattern = [%d{ISO8601}][%-5p][%-25c{1.}] [%node_name]%marker %m%n

######## Server JSON ############################
appender.rolling.type = RollingFile
appender.rolling.name = rolling
appender.rolling.fileName = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}.log
appender.rolling.layout.type = PatternLayout
appender.rolling.layout.pattern = [%d{ISO8601}][%-5p][%-25c{1.}] [%node_name]%marker %.-10000m%n
appender.rolling.filePattern = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}-%d{yyyy-MM-dd}-%i.log.gz
appender.rolling.fileName = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}_server.json
appender.rolling.layout.type = ESJsonLayout
appender.rolling.layout.type_name = server

appender.rolling.filePattern = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}-%d{yyyy-MM-dd}-%i.json.gz
appender.rolling.policies.type = Policies
appender.rolling.policies.time.type = TimeBasedTriggeringPolicy
appender.rolling.policies.time.interval = 1
Expand All @@ -29,58 +31,144 @@ appender.rolling.strategy.action.condition.type = IfFileName
appender.rolling.strategy.action.condition.glob = ${sys:es.logs.cluster_name}-*
appender.rolling.strategy.action.condition.nested_condition.type = IfAccumulatedFileSize
appender.rolling.strategy.action.condition.nested_condition.exceeds = 2GB
################################################
######## Server - old style pattern ###########
appender.rolling_old.type = RollingFile
appender.rolling_old.name = rolling_old
appender.rolling_old.fileName = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}.log
appender.rolling_old.layout.type = PatternLayout
appender.rolling_old.layout.pattern = [%d{ISO8601}][%-5p][%-25c{1.}] [%node_name]%marker %m%n
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd say it is ok that we keep the old format as is but now the new format contains different information (e.g. the cluster UUID is only present in the JSON format).


appender.rolling_old.filePattern = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}-%d{yyyy-MM-dd}-%i.log.gz
appender.rolling_old.policies.type = Policies
appender.rolling_old.policies.time.type = TimeBasedTriggeringPolicy
appender.rolling_old.policies.time.interval = 1
appender.rolling_old.policies.time.modulate = true
appender.rolling_old.policies.size.type = SizeBasedTriggeringPolicy
appender.rolling_old.policies.size.size = 128MB
appender.rolling_old.strategy.type = DefaultRolloverStrategy
appender.rolling_old.strategy.fileIndex = nomax
appender.rolling_old.strategy.action.type = Delete
appender.rolling_old.strategy.action.basepath = ${sys:es.logs.base_path}
appender.rolling_old.strategy.action.condition.type = IfFileName
appender.rolling_old.strategy.action.condition.glob = ${sys:es.logs.cluster_name}-*
appender.rolling_old.strategy.action.condition.nested_condition.type = IfAccumulatedFileSize
appender.rolling_old.strategy.action.condition.nested_condition.exceeds = 2GB
################################################

rootLogger.level = info
rootLogger.appenderRef.console.ref = console
rootLogger.appenderRef.rolling.ref = rolling
rootLogger.appenderRef.rolling_old.ref = rolling_old

######## Deprecation JSON #######################
appender.deprecation_rolling.type = RollingFile
appender.deprecation_rolling.name = deprecation_rolling
appender.deprecation_rolling.fileName = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}_deprecation.log
appender.deprecation_rolling.layout.type = PatternLayout
appender.deprecation_rolling.layout.pattern = [%d{ISO8601}][%-5p][%-25c{1.}] [%node_name]%marker %.-10000m%n
appender.deprecation_rolling.filePattern = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}_deprecation-%i.log.gz
appender.deprecation_rolling.fileName = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}_deprecation.json
appender.deprecation_rolling.layout.type = ESJsonLayout
appender.deprecation_rolling.layout.type_name = deprecation

appender.deprecation_rolling.filePattern = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}_deprecation-%i.json.gz
appender.deprecation_rolling.policies.type = Policies
appender.deprecation_rolling.policies.size.type = SizeBasedTriggeringPolicy
appender.deprecation_rolling.policies.size.size = 1GB
appender.deprecation_rolling.strategy.type = DefaultRolloverStrategy
appender.deprecation_rolling.strategy.max = 4
#################################################
######## Deprecation - old style pattern #######
appender.deprecation_rolling_old.type = RollingFile
appender.deprecation_rolling_old.name = deprecation_rolling_old
appender.deprecation_rolling_old.fileName = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}_deprecation.log
appender.deprecation_rolling_old.layout.type = PatternLayout
appender.deprecation_rolling_old.layout.pattern = [%d{ISO8601}][%-5p][%-25c{1.}] [%node_name]%marker %m%n

appender.deprecation_rolling_old.filePattern = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}\
_deprecation-%i.log.gz
appender.deprecation_rolling_old.policies.type = Policies
appender.deprecation_rolling_old.policies.size.type = SizeBasedTriggeringPolicy
appender.deprecation_rolling_old.policies.size.size = 1GB
appender.deprecation_rolling_old.strategy.type = DefaultRolloverStrategy
appender.deprecation_rolling_old.strategy.max = 4
#################################################
logger.deprecation.name = org.elasticsearch.deprecation
logger.deprecation.level = warn
logger.deprecation.appenderRef.deprecation_rolling.ref = deprecation_rolling
logger.deprecation.appenderRef.deprecation_rolling_old.ref = deprecation_rolling_old
logger.deprecation.additivity = false

######## Search slowlog JSON ####################
appender.index_search_slowlog_rolling.type = RollingFile
appender.index_search_slowlog_rolling.name = index_search_slowlog_rolling
appender.index_search_slowlog_rolling.fileName = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}_index_search_slowlog.log
appender.index_search_slowlog_rolling.layout.type = PatternLayout
appender.index_search_slowlog_rolling.layout.pattern = [%d{ISO8601}][%-5p][%-25c] [%node_name]%marker %.-10000m%n
appender.index_search_slowlog_rolling.filePattern = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}_index_search_slowlog-%i.log.gz
appender.index_search_slowlog_rolling.fileName = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs\
.cluster_name}_index_search_slowlog.json
appender.index_search_slowlog_rolling.layout.type = ESJsonLayout
appender.index_search_slowlog_rolling.layout.type_name = index_search_slowlog

appender.index_search_slowlog_rolling.filePattern = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs\
.cluster_name}_index_search_slowlog-%i.json.gz
appender.index_search_slowlog_rolling.policies.type = Policies
appender.index_search_slowlog_rolling.policies.size.type = SizeBasedTriggeringPolicy
appender.index_search_slowlog_rolling.policies.size.size = 1GB
appender.index_search_slowlog_rolling.strategy.type = DefaultRolloverStrategy
appender.index_search_slowlog_rolling.strategy.max = 4
#################################################
######## Search slowlog - old style pattern ####
appender.index_search_slowlog_rolling_old.type = RollingFile
appender.index_search_slowlog_rolling_old.name = index_search_slowlog_rolling_old
appender.index_search_slowlog_rolling_old.fileName = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}\
_index_search_slowlog.log
appender.index_search_slowlog_rolling_old.layout.type = PatternLayout
appender.index_search_slowlog_rolling_old.layout.pattern = [%d{ISO8601}][%-5p][%-25c{1.}] [%node_name]%marker %m%n

appender.index_search_slowlog_rolling_old.filePattern = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}\
_index_search_slowlog-%i.log.gz
appender.index_search_slowlog_rolling_old.policies.type = Policies
appender.index_search_slowlog_rolling_old.policies.size.type = SizeBasedTriggeringPolicy
appender.index_search_slowlog_rolling_old.policies.size.size = 1GB
appender.index_search_slowlog_rolling_old.strategy.type = DefaultRolloverStrategy
appender.index_search_slowlog_rolling_old.strategy.max = 4
#################################################
logger.index_search_slowlog_rolling.name = index.search.slowlog
logger.index_search_slowlog_rolling.level = trace
logger.index_search_slowlog_rolling.appenderRef.index_search_slowlog_rolling.ref = index_search_slowlog_rolling
logger.index_search_slowlog_rolling.appenderRef.index_search_slowlog_rolling_old.ref = index_search_slowlog_rolling_old
logger.index_search_slowlog_rolling.additivity = false

######## Indexing slowlog JSON ##################
appender.index_indexing_slowlog_rolling.type = RollingFile
appender.index_indexing_slowlog_rolling.name = index_indexing_slowlog_rolling
appender.index_indexing_slowlog_rolling.fileName = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}_index_indexing_slowlog.log
appender.index_indexing_slowlog_rolling.layout.type = PatternLayout
appender.index_indexing_slowlog_rolling.layout.pattern = [%d{ISO8601}][%-5p][%-25c] [%node_name]%marker %.-10000m%n
appender.index_indexing_slowlog_rolling.filePattern = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}_index_indexing_slowlog-%i.log.gz
appender.index_indexing_slowlog_rolling.fileName = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}\
_index_indexing_slowlog.json
appender.index_indexing_slowlog_rolling.layout.type = ESJsonLayout
appender.index_indexing_slowlog_rolling.layout.type_name = index_indexing_slowlog

appender.index_indexing_slowlog_rolling.filePattern = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}\
_index_indexing_slowlog-%i.json.gz
appender.index_indexing_slowlog_rolling.policies.type = Policies
appender.index_indexing_slowlog_rolling.policies.size.type = SizeBasedTriggeringPolicy
appender.index_indexing_slowlog_rolling.policies.size.size = 1GB
appender.index_indexing_slowlog_rolling.strategy.type = DefaultRolloverStrategy
appender.index_indexing_slowlog_rolling.strategy.max = 4
#################################################
######## Indexing slowlog - old style pattern ##
appender.index_indexing_slowlog_rolling_old.type = RollingFile
appender.index_indexing_slowlog_rolling_old.name = index_indexing_slowlog_rolling_old
appender.index_indexing_slowlog_rolling_old.fileName = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}\
_index_indexing_slowlog.log
appender.index_indexing_slowlog_rolling_old.layout.type = PatternLayout
appender.index_indexing_slowlog_rolling_old.layout.pattern = [%d{ISO8601}][%-5p][%-25c{1.}] [%node_name]%marker %m%n

appender.index_indexing_slowlog_rolling_old.filePattern = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}\
_index_indexing_slowlog-%i.log.gz
appender.index_indexing_slowlog_rolling_old.policies.type = Policies
appender.index_indexing_slowlog_rolling_old.policies.size.type = SizeBasedTriggeringPolicy
appender.index_indexing_slowlog_rolling_old.policies.size.size = 1GB
appender.index_indexing_slowlog_rolling_old.strategy.type = DefaultRolloverStrategy
appender.index_indexing_slowlog_rolling_old.strategy.max = 4
#################################################

logger.index_indexing_slowlog.name = index.indexing.slowlog.index
logger.index_indexing_slowlog.level = trace
logger.index_indexing_slowlog.appenderRef.index_indexing_slowlog_rolling.ref = index_indexing_slowlog_rolling
logger.index_indexing_slowlog.appenderRef.index_indexing_slowlog_rolling_old.ref = index_indexing_slowlog_rolling_old
logger.index_indexing_slowlog.additivity = false
2 changes: 2 additions & 0 deletions docs/reference/migration/migrate_7_0.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ See also <<release-highlights>> and <<es-release-notes>>.
* <<breaking_70_snapshotstats_changes>>
* <<breaking_70_restclient_changes>>
* <<breaking_70_low_level_restclient_changes>>
* <<breaking_70_logging_changes>>

[float]
=== Indices created before 7.0
Expand Down Expand Up @@ -58,3 +59,4 @@ include::migrate_7_0/scripting.asciidoc[]
include::migrate_7_0/snapshotstats.asciidoc[]
include::migrate_7_0/restclient.asciidoc[]
include::migrate_7_0/low_level_restclient.asciidoc[]
include::migrate_7_0/logging.asciidoc[]
33 changes: 33 additions & 0 deletions docs/reference/migration/migrate_7_0/logging.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
[float]
[[breaking_70_logging_changes]]
=== Logging changes

[float]
==== New JSON format log files in `log` directory

Elasticsearch now will produce additional log files in JSON format. They will be stored in `*.json` suffix files.
Following files should be expected now in log directory:
* ${cluster_name}_server.json
* ${cluster_name}_deprecation.json
* ${cluster_name}_index_search_slowlog.json
* ${cluster_name}_index_indexing_slowlog.json
* ${cluster_name}.log
* ${cluster_name}_deprecation.log
* ${cluster_name}_index_search_slowlog.log
* ${cluster_name}_index_indexing_slowlog.log
* ${cluster_name}_audit.json
* gc.log

Note: You can configure which of these files are written by editing `log4j2.properties`.

[float]
==== Log files ending with `*.log` deprecated
Log files with the `.log` file extension using the old pattern layout format
are now considered deprecated and the newly added JSON log file format with
the `.json` file extension should be used instead.
Note: GC logs which are written to the file `gc.log` will not be changed.

[float]
==== Docker output in JSON format

All Docker console logs are now in JSON format. You can distinguish logs streams with the `type` field.
Loading