test/04.eventlog_file.ps1

Import-Module ..\uLog.psd1 -WarningAction SilentlyContinue -Force

function test-log4
{    
    Remove-Variable -Name uLOG -ErrorAction SilentlyContinue
    $log = New-uLog 
    $log.AddLogHandler((New-uLogFile -Path 'c:\temp\testLog_test3_file.ps1.log'))
    $log.AddLogHandler((New-uLogEventLog -Name evt))
    
    Log-Info -Message 'Hello from test-log3'
    Log-Warning -Message 'Watch out ! from test-log3' -Indent 3
    Log-Info -Message 'Hello from test-log3'
    Write-Log -Message 'YES ! from test-log3' -Level SUCCESS
    $log.evt.Flush()
}

test-log4