How do I write Deephaven Core logs to a file?

How can I configure Deephaven Core to write logs to a file instead of (or in addition to) standard output?

Deephaven uses Logback for logging configuration. To write logs to a file, create a custom Logback configuration file and configure Deephaven to use it.

Create a custom configuration file

Start with Deephaven's default logback.xml as a template. Then add a file appender to write logs to disk.

For example, create a file called logback-custom.xml:

This example uses a RollingFileAppender that creates a new log file each day and retains 30 days of history. For other appender options, see the Logback documentation for FileAppender and RollingFileAppender.

Configure Deephaven to use your file

Set the logback.configurationFile system property to point to your custom configuration:

Note

Use a filename other than logback.xml for your custom file. If you name it logback.xml, it competes with Deephaven's default file — the system uses whichever one it finds first on the classpath, which can lead to unpredictable behavior.

Deephaven Enterprise logging

In Deephaven Enterprise, all query logs are automatically captured and sent to the ProcessEventLog table, where you can query them directly:

From there, use the Deephaven UI and engine to explore, filter, and aggregate logs. Deephaven Enterprise includes many other internal tables containing process logs, audit logs, performance data, and more.