icinga-powershell-framework/lib/core/icingaagent/readers/Read-IcingaAgentDebugLogFile.psm1

11 lines
332 B
PowerShell
Raw Normal View History

2019-09-29 12:25:40 -04:00
function Read-IcingaAgentDebugLogFile()
{
$Logfile = Join-Path -Path (Get-IcingaAgentLogDirectory) -ChildPath 'debug.log';
if ((Test-Path $Logfile) -eq $FALSE) {
Write-IcingaConsoleError 'Icinga 2 debug logfile not present. Unable to load it';
2019-09-29 12:25:40 -04:00
return;
}
Get-Content -Path $Logfile -Tail 20 -Wait;
2019-09-29 12:25:40 -04:00
}