Changing the default location of log and trace files

The default root directory for the log and trace files that are generated by Teracloud® Streams is the /tmp directory. To configure a different root directory, update the domainLog.path domain property by using the streamtool setdomainproperty command.

About this task

You might need to change the default location of log and trace files to a location other than the /tmp directory for the following reasons:

If you change or remove the root directory while a domain is running, you must stop and restart the domain for the update to take effect. You might have to manually remove some log and trace files. Teracloud® Streams issues messages that identify the files that you must manually remove.

If you are running the domain controller as a registered system service or unregistered service running as user root and you change the default log file location of /tmp to another location, you must restart the service and the domain for the change to take effect. To restart the service, use streamtool stopdomainhost and streamtool startdomainhost. If the controller is running as an unregistered service, specify --unregistered on the startdomainhost command. These commands must be run as user root.

Important: If you remove a configured directory while a domain is running, Teracloud® Streams services and applications continue running normally. However, Teracloud® Streams stops writing data to the directory that is removed.

If you attempt to start a domain and the directories that are specified in the domainLog.path domain property do not exist, Teracloud® Streams uses the /tmp directory.

Restrictions:
  • You can change the root directory for some log and trace files for the Teracloud® Streams services and applications. The directory for other Teracloud® Streams logs, such as installation logs, cannot be changed.
  • Log and trace file names cannot be changed.
  • The names of any subdirectories under the default /tmp directory or a configured directory cannot be changed. You can configure a different root directory for the location, but Teracloud® Streams creates the names of the subdirectories under your configured root directory.

Procedure

To change the default location of log and trace files:
Use the streamtool setdomainproperty command.
For example:
streamtool setdomainproperty -d StreamsDomain domainLog.path=/tmp/logs