compress log files - UpendoVentures/Upendo-Dnn-Prompt GitHub Wiki
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
- Upendo DNN Prompt v1.9.0
- Upendo DNN Prompt v1.9.1 (
-scheduler
flag)
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
The flags below can help you determine exactly how to use this prompt.
Flag | Type | Default | Description |
---|---|---|---|
--scheduler |
String | (none) | The --scheduler flag toggles the underling scheduled job. If choosing enable , the scheduled job will be disabled. If disable is specified, the scheduled job will be disabled. In both cases, the scheduled job will be created if it doesn't exist. |
Output
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.
Additional Notes
None at this time.