Logging

Collect and send logs to MOLO17 support

If you have an open support ticket, you can use the collect-logs utility to collect and package logs from your Gluesync deployment. This utility can be invoked from within the Gluesync Control Plane, and it can be used to collect logs from any Gluesync deployment.

To access the Collect and send logs utility go to SettingsSupportCollect and send logs.

Collect and send logs to MOLO17 support

Set the logging level

The logging level can be customized directly from the UI by navigating to SettingsSupportChange logging level and selecting the desired setting from: info, debug, trace, error.

Set the logging level from the Settings tab

Enable remote logs collection (telemetry)

The remote logs collection feature can be enabled directly from the UI by navigating to SettingsSupportEnable remote logs collection and selecting the desired setting from: enabled, disabled.

Remote logs collection is a feature that allows Gluesync to collect logs from your deployment and send them to MOLO17. This allows us to futher improve the platform and provide you with a better, pro-active support.

Note that remote logs collection is disabled by default, and when turned on it only send ERROR level logs to MOLO17.

Logs are sent anonymously and securely using Logstash (TCP under TLS) to MOLO17’s servers.

Enable remote logs collection from the Settings tab

Default log file

Gluesync by default logs its status in the system’s output console as well to a file within the following folder /var/log/gluesync/archived/gluesync.XXX.log where XXX is the file date (plus its incremental counter) used for logs rotation. This process can be customized by tweaking the logging configuration file according to the logback’s framework documentation available at: http://logback.qos.ch/documentation.html. This lets the user have great control under the hood and wider flexibility to decide which logs you want to collect (also for GDPR purposes) and where they should be stored.

You can download a sample logback.xml configuration file to get started with custom logging configuration.

To provide Gluesync with a custom Logback configuration file, you need to set the actual file path into an environment variable called LOG_CONFIG_FILE similar to what you’re used to doing for both the license and configuration file. Once set, Gluesync will override its default log settings and use the provided ones.

LOG_CONFIG_FILE=/path/to/logback.xml

Below you can find the default configuration file used by our professional services. You can also download this logback.xml file directly.

<?xml version="1.0" encoding="UTF-8"?>
<included>

    <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
        <encoder>
            <pattern>
                %d{yyyy-MM-dd'T'HH:mm:ss.SSS} [%t] %c{0} %p - %msg%n
            </pattern>
        </encoder>
    </appender>

    <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
       <file>/opt/gluesync/logs/${JAR_NAME:-gluesync}.log</file>
       <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
           <fileNamePattern>/opt/gluesync/logs/archived/${JAR_NAME:-gluesync}.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
           <!-- each archived file, size max 100MB -->
           <maxFileSize>100MB</maxFileSize>
           <!-- total size of all archive files, if total size > 1GB, it will delete old archived file -->
           <totalSizeCap>1GB</totalSizeCap>
           <!-- 5 days to keep -->
           <maxHistory>5</maxHistory>
       </rollingPolicy>
       <encoder>
           <pattern>%d{yyyy-MM-dd'T'HH:mm:ss.SSS} %c{1} %p %m%n</pattern>
       </encoder>
   </appender>

    <logger name="com.molo17.gluesync" level="debug" additivity="false">
        <appender-ref ref="CONSOLE"/>
        <appender-ref ref="FILE"/>
    </logger>

</included>

Customize logs time zone

By default, Gluesync takes its time zone by the host operating system. In the case of containerized environments, Gluesync can be told to change that behavior by passing to the container orchestrator a different time zone.

Here we’re providing an example of how you can pass a different value in a docker-compose environment:

environment:
    - TYPE=source #example of other environment variables
    - LOG_CONFIG_FILE=/opt/gluesync/data/logback.xml #example of other environment variables
    - TZ=Asia/Bangkok # <--- this is the time zone you want to set
  • TZ: is key that you will need to customize by issuing a value of Region/City.

Exporting logs

Use the scripts included in the Gluesync Kit to collect and package logs (collect-logs.sh on Linux/macOS, collect-logs.ps1 on Windows).

To read more you can check out our dedicated section here.