General Settings and Logging

The <general> configuration element specifies ObjectDB settings that are relevant to both the server and the client.

The default configuration file contains the following <general> element:

<general>
  <temp path="$temp/ObjectDB" threshold="64mb" />
  <network inactivity-timeout="0" />
    <url-history size="50" user="true" password="true" />
  <log path="$objectdb/log/" max="8mb" stdout="false" stderr="false" />
  <log-archive path="$objectdb/log/archive/" retain="90" />
  <logger name="*" level="info" />
</general>

The <temp> element

  <temp path="$temp/ObjectDB" threshold="64mb" />

To meet memory constraints, ObjectDB can use temporary files when processing large amounts of data, such as query results that contain millions of objects.

The <temp> element specifies temporary file settings:

  • The path attribute specifies the directory in which temporary files are generated. The $temp prefix represents the default system temporary directory.
  • Using RAM is much faster than using temporary files. Therefore, ObjectDB uses temporary files only for data that exceeds a size limit specified by the threshold attribute. The mb and kb suffixes represent megabytes and kilobytes, respectively.

The <network> element

  <network inactivity-timeout="0" />

The inactivity-timeout attribute specifies the timeout in seconds before an inactive network socket is closed. A value of 0 disables the inactivity timeout.

In client-server mode, the inactivity timeout (if greater than 0) applies to both the server and the client. This setting has no effect in embedded mode.

Specifying an inactivity timeout can resolve firewall-related issues. If a firewall enforces its own inactivity timeout on sockets, you must specify a shorter inactivity timeout for ObjectDB to prevent it from using sockets that the firewall has already closed.

The <url-history> element

  <url-history size="50" user="true" password="true" />

ObjectDB manages a list of the most recently used database URLs for the Explorer tool.

  • The size attribute specifies the maximum size of this list. To disable this feature, set the size to 0.
  • The user attribute specifies whether to save usernames with URLs in client-server mode.
  • The password attribute specifies whether to also save passwords with URLs.

Saving usernames and passwords with the URL makes accessing recently used databases in the Explorer easier.

The <log> element

  <log path="$objectdb/log/" max="8mb" stdout="false" stderr="false" />

The <log> element specifies general logging settings:

  • The path attribute specifies the directory in which log files are generated. The $objectdb prefix represents the ObjectDB installation directory. If the path is empty (""), file logging is disabled.
  • Every day, a new log file is generated with the name odb<yyyymmdd>.log, where <yyyymmdd> represents the date. A new log file is also generated when the current log file exceeds the maximum size specified by the max attribute.
  • The stdout and stderr attributes specify whether to also write log messages to standard output and standard error, respectively, in addition to the log file.

The <log-archive> element

  <log-archive path="$objectdb/log/archive/" retain="90" />

Old log files are moved to an archive directory.

The <log-archive> element specifies the log archive settings:

  • The path attribute specifies the archive directory.
  • The retain attribute specifies the number of days to retain archived log files. Archived log files older than this period are automatically deleted.

The <logger> elements

  <logger name="*" level="info" />

The <logger> elements specify logging levels. The  * logger, as shown in the default configuration above, represents the entire ObjectDB system.

You can add <logger> elements to override the default logging level for a specific ObjectDB subsystem. The names of the subsystem loggers are currently undocumented and can change at any time without notice.

The supported logging levels are:

  • fatal
  • error
  • warning
  • info
  • trace
  • debug