The purpose of this article is to explain how to change the logging levels in GPText.
If the logging level in GPText is not sufficient to be able to identify an issue with the GPText solr instances, the logging level may need to be increased.
There are several different logging levels for GPText as shown in the table below:
|DEBUG||Report Debug level messages.|
|INFO||Report everything but normal status.|
|WARN||Report all Warning messages.|
|ERROR||Report all Error messages.|
|FATAL||Report all Fatal messages|
|OFF||Turns off logging.|
|UNSET||Removes the previous log setting.|
The default logging level value is "WARN". This value is set in the gpsegN/solr/lib/log4j.properties file. The parameter "log4j.rootCategory" needs to be changed in the file to the required logging level.
If there are several segments that need to have the parameter changed the following script can be used to change the parameter:
gpssh -f $1 -e "for file in \$(find $2 -name log4j.properties); do echo \$file' log level changed to INFO'; sed -i 's/log4j.rootCategory=.*,/log4j.rootCategory=INFO,/' \$file; done;"
where "log4j.rootCategory=INFO" needs to be changed to the required value.
NOTE: After the parameter has been changed, GPText will need to be restarted: