Skip to content

Commit cf3d23d

Browse files
authored
Merge pull request #135 from Robomikel/pre-release/stabilizing
updated - serverlog clean up
2 parents 514487d + 3287cb0 commit cf3d23d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

functions/core_functions.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -484,6 +484,10 @@ Function Remove-backupLogs {
484484
If (Test-Path $logdir\backup_$serverfiles-*.log) {
485485
Get-Childitem -Depth 1 $logdir\$serverfiles-*.log -Recurse | Sort-Object CreationTime -desc | Select-Object -Skip "$consolelogcount" | Remove-Item -Force -ea SilentlyContinue
486486
}
487+
If (Test-Path "${logdirectory}\Backup -*") {
488+
Write-log "Removing logs over $consolelogcount ${logdirectory}\Backup - * - $log}"
489+
Get-Childitem -Depth 1 "${logdirectory}\Backup -*" -Recurse | Sort-Object CreationTime -desc | Select-Object -Skip "$consolelogcount" | Remove-Item -Force -ea SilentlyContinue
490+
}
487491
}
488492
Function Remove-ServerconsoleLogs {
489493
Write-log "Function: $($MyInvocation.Mycommand)"

0 commit comments

Comments
 (0)