Log configuration

I wanted to understand how to configure LOG configurations as to manage log file rotation policy, log purging etc. I assume TG is using log4j internally. Can some one guide me on this.

Internally TigerGraph uses different logging libraries depending on the language the service was written. Luckily, all of this is abstracted away from the user by the TigerGraph infrastructure. All of the logging configuration can be done with gadmin commands.

If you want to run through all of the various configurations you can use gadmin config entry LogConfig. This will let you go through all of the config fields that contain LogConfig, which is the parent configuration of logging config for every service.

For each service the configuration value will take the form of SERVICE_NAME.BasicConfig.LogConfig.CONFIG_VALUE where each of the CONFIG_VALUEs is described below.

To give a more general over view of the knobs that you can control for each service. All of the TigerGraph native services have the following configurations. Unfortunately I only had a v3.1.6 server running to check this so the default values I included may be incorrect if you have a later version.
LogFileMaxSizeMB - the maximum file size in mb of the log before the Infrastructure rotates it. Default value of 100mb.
LogFileMaxDurationDay - The maximum number of days to retain old log files based on the timestamp encoded in their filename. Default value of 90 days.
LogRotationFileNumber - The maximum number of old log files to retain
LogLevel - the level of logging. Varies slightly service to service. Example for RESTPP: (“OFF”, “BRIEF”, “DEBUG”, “VERBOSE”)

In the case of certain open source services (Nginx, ZooKeeper, Kafka) that we leverage internally, the options may be slightly different. For example, Nginx has no option to control the LogLevel as that is done in the Nginx configuration.


Thanks @Elliot_Martin, that was extremely helpful.

Hi @Elliot_Martin Thanks, your suggestion helped and I was able to set the log rotation . Additionally is there a way to define the log pattern as in dateTime format, and other things as we could do in log4j ?

We do not currently support configuring a user defined log pattern. I’ll go ahead and log a feature request with the Product Management team on this as I think this could be useful for others as well.