-
-
Notifications
You must be signed in to change notification settings - Fork 2
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.
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. |
This prompt does not have any flags at this time.
If successful, you'll see a message like below in the Prompt window.
Log compression job executed successfully.
If any errors occur, the message below may be displayed.
An error occurred. Please check the log files to find and resolve the issue.
None at this time.
Are you getting any value out of this content and/or the source code here?
Please consider becoming a sponsor. Any amount is appreciated!
This project is donated to the DNN Community and the world by Upendo Ventures.
If you need support or would like to sponsor an enhancement for any of our open-source projects, please contact us.