Limit log size
Limit log size
Is there a way to limit the log file size in BI5?
- Thixotropic
- Posts: 747
- Joined: Wed Sep 04, 2019 7:20 pm
- Location: Low-Earth Orbit
Re: Limit log size
The manual includes this on page 144:
"By default, a new log file is created each month to prevent it from growing too large.
For your convenience a View log button is provided. These files are not otherwise managed
and will eventually use considerable disc space. Please be sure to prune this folder on
occasion as required."
So, it looks like there's no way to limit the log natively.
I suppose you could use a Powershell script to delete some or all of the files every so often. The script below could do it with minor modifications.
"By default, a new log file is created each month to prevent it from growing too large.
For your convenience a View log button is provided. These files are not otherwise managed
and will eventually use considerable disc space. Please be sure to prune this folder on
occasion as required."
So, it looks like there's no way to limit the log natively.
I suppose you could use a Powershell script to delete some or all of the files every so often. The script below could do it with minor modifications.
Code: Select all
# Delete all Files in C:\path\to\blue\iris\logs older than 30 day(s)
$Path = "C:\path\to\blue\iris\logs"
$Daysback = "-30"
$CurrentDate = Get-Date
$DatetoDelete = $CurrentDate.AddDays($Daysback)
Get-ChildItem $Path | Where-Object { $_.LastWriteTime -lt $DatetoDelete } | Remove-Item
Blue Iris 5.x x64 | Windows 10 Pro x64 | 16GB RAM | i7-7700 3.6 GHz | 1TB HDD | 2TB RAID NAS | 9 Cameras | Almost Dual NIC | 2KVA UPS
- Thixotropic
- Posts: 747
- Joined: Wed Sep 04, 2019 7:20 pm
- Location: Low-Earth Orbit
Re: Limit log size
For what it's worth, my January log ended up being about 18 megs. I don't know specifically what's being logged, mine is still set to whatever the default is.
At ~20 megs per month that'd be 240M per year. Not too bad. That's not a lot of storage these days but I could see where over time or with lots of cameras and events being logged, it could definitely eat up some space.
I'm more concerned that opening the file, writing to it, and then closing it would take some time and CPU cycles, maybe cause some hiccups. I think I'll write a Powershell script that runs daily to check the overall size of the directory, and then prune older files if it's over a certain size.
Another little task to do, lol.
At ~20 megs per month that'd be 240M per year. Not too bad. That's not a lot of storage these days but I could see where over time or with lots of cameras and events being logged, it could definitely eat up some space.
I'm more concerned that opening the file, writing to it, and then closing it would take some time and CPU cycles, maybe cause some hiccups. I think I'll write a Powershell script that runs daily to check the overall size of the directory, and then prune older files if it's over a certain size.
Another little task to do, lol.
Blue Iris 5.x x64 | Windows 10 Pro x64 | 16GB RAM | i7-7700 3.6 GHz | 1TB HDD | 2TB RAID NAS | 9 Cameras | Almost Dual NIC | 2KVA UPS
Re: Limit log size
I dont really care about the size. Lots of disk space on my computer. I would like it more if I could set a size limit or time limit. I am only interested in less than a day or so. My general needs are immediate and not with the archival of long past events. I only keep 3 days of recording unless there is something I feel is important from a security standpoint. Right now I just trim it down when I need to look at it for some reason, not very often.