Skip to main content

gflog.xml

gflog.xml configures gflog, the logging framework DIAL Core uses. It sets where log entries go, how log files rotate, and how verbose each logger is. Like the static settings, it is read at startup. This reference is for platform engineers who collect Core's logs.

File location​

The configuration file is passed via the JAVA_OPTS environment variable and mounted as a volume in Docker Compose:

core:
environment:
'JAVA_OPTS': '-Dgflog.config=/opt/settings/gflog.xml'
'LOG_DIR': '/app/log'
volumes:
- ./settings:/opt/settings
- ./core-logs:/app/log

Default configuration​

From dial-docker-compose/settings/gflog.xml:

<config>
<appender name="console" factory="com.epam.deltix.gflog.core.appender.ConsoleAppenderFactory"/>
<appender name="file" factory="com.epam.deltix.gflog.core.appender.DailyRollingFileAppenderFactory"
bufferCapacity="32m"
file="/app/log/aidial.log"
maxFiles="10"
maxFileSize="1g">
<layout template="%m%n"/>
</appender>

<logger level="INFO">
<appender-ref ref="console"/>
</logger>

<logger level="INFO" name="aidial.log">
<appender-ref ref="file"/>
</logger>

<service entryEncoding="UTF-8" entryMaxCapacity="30m" bufferCapacity="128m"/>
</config>

Appender reference​

AppenderTypeDescription
consoleConsoleAppenderFactoryWrites log entries to standard output.
fileDailyRollingFileAppenderFactoryWrites to a daily rolling file. Rotates daily, retaining up to maxFiles files of up to maxFileSize each.

File appender settings​

AttributeDefaultDescription
file—Log file path.
maxFiles10Number of rotated log files to retain.
maxFileSize1gMaximum size per log file before rotation.
bufferCapacity32mIn-memory buffer size for the file appender.

Service settings​

AttributeDefaultDescription
entryEncodingUTF-8Character encoding for log entries.
entryMaxCapacity30mMaximum size of a single log entry.
bufferCapacity128mGlobal logging service buffer size.

Customization​

To increase log verbosity for debugging, change the logger level:

<logger level="DEBUG">
<appender-ref ref="console"/>
</logger>

To disable file logging entirely, remove the file appender and its logger reference.

Further reading​