Page 1 of 1
Limit log size
Posted: Fri Jan 31, 2020 5:02 pm
by hotbrass
Is there a way to limit the log file size in BI5?
Re: Limit log size
Posted: Fri Jan 31, 2020 8:37 pm
by Thixotropic
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.
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
hotbrass wrote: ↑Fri Jan 31, 2020 5:02 pm
Is there a way to limit the log file size in BI5?
Re: Limit log size
Posted: Sat Feb 01, 2020 8:56 pm
by Thixotropic
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.
Re: Limit log size
Posted: Sat Feb 01, 2020 9:30 pm
by hotbrass
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.
Re: Limit log size
Posted: Sun Feb 02, 2020 2:28 am
by MikeBwca
hotbrass wrote: ↑Sat Feb 01, 2020 9:30 pm
...
lol. I actually thought there was a bug on my screen and tried to swoosh it away!
Re: Limit log size
Posted: Sun Feb 02, 2020 5:26 am
by hotbrass
MikeBwca wrote: ↑Sun Feb 02, 2020 2:28 am
hotbrass wrote: ↑Sat Feb 01, 2020 9:30 pm
...
lol. I actually thought there was a bug on my screen and tried to swoosh it away!
LOL! I've had that bug since 2005! Always good for a laugh.