icinga-powershell-framework/lib/core/icingaagent/readers/Read-IcingaAgentDebugLogFile.psm1
2020-02-13 10:12:57 +01:00

10 lines
318 B
PowerShell

function Read-IcingaAgentDebugLogFile()
{
$Logfile = Join-Path -Path (Get-IcingaAgentLogDirectory) -ChildPath 'debug.log';
if ((Test-Path $Logfile) -eq $FALSE) {
Write-Host 'Icinga 2 debug logfile not present. Unable to load it';
return;
}
Get-Content -Path $Logfile -Tail 20 -Wait;
}