Set logging levels
Set the severity level of logged event messages logged for Elasticsearch, Neo4j, and PostgreSQL.
Contents
About logging levels
As of release 2.8.0, the default logging level for bundled instances of Elasticsearch, Neo4j, and PostgreSQL events is ERROR, or their respective equivalents.
Setting more verbose logging levels such as INFO or WARNING can cause significantly higher resource usage on your systems.
Elasticsearch logging levels
Elasticsearch relies on Log4j for logging. You can configure the following logging levels for Elasticsearch:
Available logging levels:
TRACE
DEBUG
INFO
WARN
ERROR
All
OFF
Change the logging level dynamically
To temporarily and dynamically change the logging level for Elasticsearch:
Open the Kibana Dev Tools Console. In your web browser, go to https://${platform_host_name}/private/kibana/app/dev_tools#/console.
For example, https://eclecticiq.platform.org/private/kibana/app/dev_tools#/console
Using the Dev Tools Console, send the following PUT request:
# Raise the logging severity from ERROR to DEBUG
PUT
/
_cluster
/
settings
{
"transient"
: {
"logger._root"
:
"DEBUG"
}
}
The Console should display a response that looks like this:
{
"acknowledged"
: true,
"persistent"
: {},
"transient"
: {
"logger"
: {
"_root"
:
"DEBUG"
}
}
}
Change the logging level permanently
To permanently change the logging level for Elasticsearch:
Edit log4j2.properties as root:
vi
/etc/eclecticiq-elasticsearch/log4j2
.properties
In the log4j2.properties file, browse to the rootLogger.level parameter, and then assign it the new logging level:
/
/
Raise the logging severity
from
'error'
to
'debug'
rootLogger.level
=
debug
Save log4j2.properties, and exit the text editor.
Restart the Elasticsearch service. Run as root:
Neo4j logging levels
You can configure the following logging levels for Neo4j:
DEBUG
INFO
WARN
ERROR
NONE
Change the logging level permanently
To permanently change the logging level for Neo4j:
Edit neo4j.conf as root:
vi
/
etc
/
eclecticiq
-
neo4j
/
neo4j.conf
In the neo4j.conf file, browse to the dbms.logs.debug.level parameter, and then assign it the new logging level:
/
/
Lower the logging severity
from
'ERROR'
to
'INFO'
dbms.logs.debug.level
=
INFO
Save neo4j.conf, and exit the text editor.
Restart the Neo4j service. Run as root:
systemctl restart neo4j
PostgreSQL logging levels
You can configure the logging levels for PostgreSQL from INFO to PANIC.
Change the logging level permanently
To permanently change the logging level for PostgreSQL:
Edit eclecticiq-postgres.conf as root:
vi
/
etc
/
eclecticiq
-
postgres
/
eclecticiq
-
postgres.conf
In the eclecticiq-postgres.conf file, browse to the following parameters, and then assign them new values for the logging level:
/
/
Lower the logging severity
from
ERROR to WARNING
/
/
Set
log verbosity to DEFAULT (medium;
min
verbosity: TERSE;
max
verbosity: VERBOSE)
log_min_messages
=
'WARNING'
log_min_error_statement
=
'ERROR'
log_error_verbosity
=
'DEFAULT'
Save eclecticiq-postgres.conf, and exit the text editor.
Restart the PostgreSQL service. Run as root:
systemctl restart postgresql
-
11