This topic explains how to name, search and create log files in VMware Tanzu GemFire. For efficiency and clarity in log management, VMware recommends that each member sends logs to its own files.
For members running on the same machine, you can have them log to their own files by starting them in different working directories and using the same, relative log-file
specification. For example, you could set this in <commonDirectoryPath>/gemfire.properties
:
log-file=./log/member.log
After this, start each member in a different directory with the following command, which points to the common properties file:
java -DgemfirePropertyFile=<commonDirectoryPath>/gemfire.properties
By following the above instructions, each member has its own log files under its own working directory.
For the clearest picture, merge the log files, with the gfsh export logs
command:
gfsh> export logs --dir=myDir --dir=myDir --merge-log=true
Search for lines that begin with these strings:
In addition to the system logs, you can add your own application logs from your Java code. For information about adding custom logging to your applications, see the online Java documentation for the org.apache.geode.LogWriter
interface. Both system and application logging is output and stored according to your logging configuration settings.