Changing the default location of log and trace files
About this task
- To increase the maximum log file size from the default size
- To keep Teracloud® Streams logs and trace files in a secure location
- System maintenance utilities, such as tmpwatch, remove logs from the /tmp directory. For more information, see Instance log files deleted by the system maintenance utilities.
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.
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.
- 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
streamtool setdomainproperty -d StreamsDomain domainLog.path=/tmp/logs