mirror of
https://github.com/Yamato-Security/WELA.git
synced 2025-12-06 17:22:50 +01:00
feat: full/rotate check
This commit is contained in:
3
WELA.ps1
3
WELA.ps1
@@ -1464,6 +1464,7 @@ function AuditFileSize {
|
|||||||
$maxLogSize = [math]::Floor($logInfo.MaximumSizeInBytes / 1MB)
|
$maxLogSize = [math]::Floor($logInfo.MaximumSizeInBytes / 1MB)
|
||||||
$recommendedSize = [int]($logNames[$logName][1] -replace " MB\+?", "")
|
$recommendedSize = [int]($logNames[$logName][1] -replace " MB\+?", "")
|
||||||
$correctSetting = if ($maxLogSize -ge $recommendedSize) { "Y" } else { "N" }
|
$correctSetting = if ($maxLogSize -ge $recommendedSize) { "Y" } else { "N" }
|
||||||
|
$logIsFull = $logInfo.FileSize -gt $logInfo.MaximumSizeInBytes
|
||||||
|
|
||||||
$results += [PSCustomObject]@{
|
$results += [PSCustomObject]@{
|
||||||
LogFile = Split-Path $logInfo.LogFilePath -Leaf
|
LogFile = Split-Path $logInfo.LogFilePath -Leaf
|
||||||
@@ -1471,7 +1472,7 @@ function AuditFileSize {
|
|||||||
MaxLogSize = "$maxLogSize MB"
|
MaxLogSize = "$maxLogSize MB"
|
||||||
Default = $logNames[$logName][0]
|
Default = $logNames[$logName][0]
|
||||||
Recommended = $logNames[$logName][1]
|
Recommended = $logNames[$logName][1]
|
||||||
IsLogFull = $logInfo.IsLogFull
|
IsLogFull = $logIsFull
|
||||||
LogMode = $logInfo.LogMode
|
LogMode = $logInfo.LogMode
|
||||||
CorrectSetting = $correctSetting
|
CorrectSetting = $correctSetting
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user