Configure Symphony Logs

This applies to: Visual Data Discovery

The microservices used in Symphony write logs to their corresponding service's log files by default. You can configure Symphony to write these logs to the console only, or to write logs both to the console and the service's log files. Structured logging is also supported. See Structured Logging.

Every service config file includes two properties you can use to define where the logs are written:

  • log.console.level - edit to define the types of logs to write to the console
  • log.file.level - edit to define the types of logs to write to the files

Log Properties in Config Files

If you install using the bootstrap script, logging to files is enabled by default. You can reroute the logging to the console as needed to customize your installation.

If the value of log properties is set to OFF, Symphony access logs are not written. For all other cases (ALL, ERROR, WARN, DEBUG, and INFO) access logs are written to the selected destination: file, console or both.

  • Bootstrap installation: The *.jvm file specifies log.console.level=OFF and log.file.level=ALL to support compatibility with earlier versions of Symphony.

Values for log.file.level and log.console.level

The following table lists possible values for log.file.level and log.console.level.

Value Description
ALL All available log information.
ERROR Application error messages that may affect processes.
WARN Unexpected application issues that may not affect processes.
INFO Expected activities.
DEBUG Triggers capture of WARN, INFO, and ERRORinformation.
OFF Disables logging.

Enable Logging for a Service to the Console

Enable logging to the console and append the desired corresponding value of the properties to the appropriate service configuration file.

  • Use log.console.level=ALL to route duplicates of all logs to the console.

  • Use log.console.level=ERROR to route only duplicates of errors to the console.

  • Alternatively, use log.console.level=ALL and log.console.level=ERROR to have all logs in files and errors duplicated to the console.

Adjust the values to meet your needs, then restart the service after you've edited the config.

Symphony services have two config files, *properties and *.jvm. If you add log configuration properties to both files, the priority of *.jvm is higher than *. properties.

Consul Logging

By default, Consul writes logs to the console, but you can duplicate logs to files if needed.

Configure Consul Logs to Duplicate to Files:

  1. Edit the Consul config file, consul.json. For Linux installations, this is located in /opt/zoomdata/conf/consul.json.

  2. Add the following properties:

    "log_file": "/opt/zoomdata/logs/zoomdata-consul.log",

    "log_rotate_bytes": 104857600,

    "log_rotate_max_files" : 5

    Adjust the path to your log file and other log configuration properties as needed for your environment. In Linux environments, the log is located in /opt/zoomdata/logs, and in <install-path>/logs for Windows environments. See Consul documentation for more information.

Structured Logging

Symphony supports structured logging. You can enable for installations done via bootstrap, and is enabled by default for Kubernetes environments.

Components Support for Structured Logging

  • zoomdata-web
  • query engine
  • admin server
  • screenshot service
  • data writer
  • data connectors

Enable Structured Logging

In bootstrap environments, set the property log.structured.enabled to true in the config files of your microservices to output logs in JSON format to the STDOUT destination. Logs output to the FILE logs destination are sent in plain text. See Configuration Property Files.

In Kubernetes environments, structured logging is enabled by default. To disable, use one of the following approaches:

  • Set the environment variable LOG_STRUCTURED_ENABLED to false to disable logging for specific services.
  • Set structuredLogsEnabled in values.yaml to false to disable logging for all services.
  • For Consul, change the log_json value to false in the consul.server.extraConfig section of values.yaml.