2020-03-24 09:04:41 -04:00
|
|
|
function Register-IcingaEventLog()
|
|
|
|
|
{
|
2022-01-14 13:57:43 -05:00
|
|
|
param (
|
|
|
|
|
[string]$LogName = $null
|
|
|
|
|
);
|
2020-03-24 09:04:41 -04:00
|
|
|
|
2022-01-14 13:57:43 -05:00
|
|
|
if ([string]::IsNullOrEmpty($LogName)) {
|
|
|
|
|
New-EventLog -LogName 'Icinga for Windows' -Source 'IfW::Framework' -ErrorAction SilentlyContinue;
|
|
|
|
|
New-EventLog -LogName 'Icinga for Windows' -Source 'IfW::Service' -ErrorAction SilentlyContinue;
|
|
|
|
|
New-EventLog -LogName 'Icinga for Windows' -Source 'IfW::Debug' -ErrorAction SilentlyContinue;
|
|
|
|
|
} else {
|
|
|
|
|
$LogName = [string]::Format('IfW::{0}', $LogName);
|
2020-08-06 13:06:59 -04:00
|
|
|
|
2022-01-14 13:57:43 -05:00
|
|
|
New-EventLog -LogName 'Icinga for Windows' -Source $LogName -ErrorAction SilentlyContinue;
|
2020-03-24 09:04:41 -04:00
|
|
|
}
|
|
|
|
|
}
|