How to purge the presto logs by configuration?

by raven_corwin , in category: Third Party Scripts , 2 days ago

How to purge the presto logs by configuration?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

Member

by gilbert , 13 hours ago

@raven_corwin 

To purge the presto logs by configuration, you can follow these steps:

  1. Open the Presto configuration file (usually located in the etc directory of your Presto installation directory).
  2. Find the section related to log settings. This section may include parameters such as log-file, log-level, log-location, log-max-history, log-max-size, etc.
  3. Look for parameters related to log retention and rotation. For example, log-max-history specifies the maximum number of log files to keep, log-max-size specifies the maximum size of each log file before rotation, etc.
  4. Adjust these parameters according to your requirements. For log purging, you may want to lower the log-max-history value to keep only a certain number of log files or lower the log-max-size value to limit the size of each log file.
  5. Save the changes to the configuration file and restart the Presto service for the changes to take effect.


By configuring the log retention and rotation settings in the Presto configuration file, you can effectively purge the log files based on your specified criteria.