Description
This guide will show you how to compress and rename any log file that's over 50MB, delete old archives, and then repeat this process automatically each week. Up to 30 of these compressed files will be kept for each log, which gives you over 6 months of archives. You can easily change these settings.
The Problem
If you have log files turned on in EverQuest (
Some EverQuest software such as Gamparse has log rotate built in, but if you prefer a more generic solution here's what I use:
The Solution
LogRotateWin (download)
Install LogRotateWin and then go to the install folder, by default:
Create a file called
in your new eqrotate.conf file, add the following:
Unless you're named Redbot, be sure to change folder locations to suit your setup.
Now you can run the script manually from the command prompt, powershell, or any CLI provided you run them as administrator.
Now Let's Automate!
But it's even easier to run from task scheduler, where you can also schedule it to run each week.
Open the task scheduler by searching Windows for "task scheduler"
click "create basic task"
Give it a name,
Choose how often to run,
For action, choose start a program
Program: powershell
Add arguments: ./logrotate eqrotate.conf
Start in: C:\Program Files (x86)\Ken Salter\LogRotate
There's a screen to review your settings, click finish.
Now go to your Task Scheduler Library and right-click your newly made task and select "properties"
At the bottom of the General tab, make sure "Run with highest privileges" is set,
Now right-click the task and select "Run" to make sure it works, and enjoy your tidy hard drive!
This guide will show you how to compress and rename any log file that's over 50MB, delete old archives, and then repeat this process automatically each week. Up to 30 of these compressed files will be kept for each log, which gives you over 6 months of archives. You can easily change these settings.
The Problem
If you have log files turned on in EverQuest (
/log on
) and Very Vanilla (/mlog on
) you may have noticed they grow very quickly and become a pain to open and parse. One user didn't know they had logs turned on, until they ran out of HDD space due to a several hundred GB log file.Some EverQuest software such as Gamparse has log rotate built in, but if you prefer a more generic solution here's what I use:
The Solution
LogRotateWin (download)
Install LogRotateWin and then go to the install folder, by default:
C:\Program Files (x86)\Ken Salter\LogRotate
Create a file called
eqrotate.conf
(There will be permission issues, you'll need to create it elsewhere and copy it into this folder. You could also put it in a folder that doesn't need permissions, but this is pointless for EQ as you'll need admin privileges to rotate active logs anyway)in your new eqrotate.conf file, add the following:
INI:
# sample logrotate configuration file
# uncomment to enable compression of rotated log files
compress
C:\Users\Redbot\Games\Everquest\Logs\eqlog*.txt {
rotate 30
size 50M
prerotate
@echo off
echo Let's keep our EQ folder tidy
echo parameter pass %1
VER | TIME > TEMP.BAT
ECHO SET TIME=%%3>CURRENT.BAT
DEL TEMP.BAT
DEL CURRENT.BAT
ECHO It's %TIME% now
endscript
}
C:\Users\Redbot\Games\macroquest\Release\logs\*.log {
rotate 30
size 50M
prerotate
@echo off
echo Let's keep our VV folder tidy
echo parameter pass %1
VER | TIME > TEMP.BAT
ECHO SET TIME=%%3>CURRENT.BAT
DEL TEMP.BAT
DEL CURRENT.BAT
ECHO It's %TIME% now
endscript
}
Unless you're named Redbot, be sure to change folder locations to suit your setup.
Now you can run the script manually from the command prompt, powershell, or any CLI provided you run them as administrator.
Now Let's Automate!
But it's even easier to run from task scheduler, where you can also schedule it to run each week.
Open the task scheduler by searching Windows for "task scheduler"
click "create basic task"
Give it a name,
Choose how often to run,
For action, choose start a program
Program: powershell
Add arguments: ./logrotate eqrotate.conf
Start in: C:\Program Files (x86)\Ken Salter\LogRotate
There's a screen to review your settings, click finish.
Now go to your Task Scheduler Library and right-click your newly made task and select "properties"
At the bottom of the General tab, make sure "Run with highest privileges" is set,
Now right-click the task and select "Run" to make sure it works, and enjoy your tidy hard drive!
- Minimum Required Level
- 1