How to change GPText logging levels
search cancel

How to change GPText logging levels

book

Article ID: 295976

calendar_today

Updated On:

Products

VMware Tanzu Greenplum

Issue/Introduction

The purpose of this article is to explain how to change the logging levels in GPText.

Environment


Cause

If the logging level in GPText is not sufficient to be able to identify an issue with the GPText solr instances, the logging level needs to be increased.

Resolution

There are several different logging levels for GPText as shown in the table below: 

Level Results
All Report everything.
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 needs to be restarted:

gptext-stop
gptext-start


Additional Information