Skip to content

compress log files

Will Strohl edited this page Feb 10, 2025 · 1 revision

compress-log-files

This command helps reduce the size of log files and keeps server resources optimized. The compress-log-files command compresses log files from the /Portals/_default/Logs/ directory, focusing only on the of files from the previous month. If found, the command archives them into a zip file named Logs-YYYYmm.zip, where YYYY is the year and mm is the two-digit month.

The logic includes complementary log files, such as installation and failure logs, if they exist.

After, the logic will then delete any failure log files after they are archived.

There is a complimentary scheduled job that is automatically installed and configured for you, making this command only necessary if the job is disabled or failed for some reason. The command can be used on-demand in these kinds of use cases. This command ignores log files created before the installation of the scheduled job.

Added In Version

Command

Command Description
compress-log-files This command will archive all prior month log files on the server, and then delete them after being zipped into a single zip file.

Arguments

This prompt does not have any flags at this time.

Output

If successful, you'll see a message like below in the Prompt window.

Log compression job executed successfully.

410276975-2db7d6c6-0630-437c-a6ee-f82bf7efeb69

410276907-95217f30-b0ef-4997-9f10-0a446e97c18a

If any errors occur, the message below may be displayed.

An error occurred. Please check the log files to find and resolve the issue.

Additional Notes

None at this time.