DirWiz Logo
Knowledgebase

Article Tags

Automating Log File Management

2019-08-15 16:45:44
System Requirements Troubleshooting UnitySync 

You may schedule log file cleanup in your automated sync batch. The primary shell.exe program includes an option to clean-up old log files. By adding --cleanlogs to your automated batch script, your automated process will keep your logs in check by deleting all but the desired most recent logs.

Command Line cleanup

Execute the following command:

shell --cleanlogs

By default, cleanLogs runs against ALL connections and 30 days worth of logs will be saved. The rest will be deleted.

Optional –days parameter:

shell --cleanlogs [--days x]

Default is to keep 30 days worth of logs. You may use the --days parameter to increase or decrease the number of days worth of logs to keep.

Connection Name

shell --cleanlogs [Connection Name]

By default if you do not specify a connection name, cleanlogs will clean all connections logs. Specify a connection name to run clean logs against an individual connection.

Scheduling

You may add the shell --cleanlogs command to your automated script to regularly run and keep the number of log files limited as desired.

Additional command line cleanup examples:

Delete logs from one specific Connection within a FOLDER:

shell --cleanlogs --days 60 "folderX\YourConnectionNameY"

Delete logs from ALL Connections within a FOLDER:

for /D %%D in (..\connections\FolderA\*.) DO ..\Programs\shell.exe --cleanlogs -days 60 "%%D"

To Delete Log Files Manually:

Logs may be deleted manually from File Explorer. Log files are located in: ...\UnitySync\connections\YourConnectionName\log

Share this article: Twitter reddit