test/test2_eventlog.ps1
Import-Module ..\uLog.psd1 -WarningAction SilentlyContinue function test-log2 { Remove-Variable -Name uLOG -ErrorAction SilentlyContinue $log = New-uLog $log.AddLogHandler( (New-uLogEventLog) ) Log-Info -Message 'Hello from test-log2' Log-Warning -Message 'Watch out ! from test-log2' -Indent 3 Log-Info -Message 'Hello from test-log2' Write-Log -Message 'YES ! from test-log2' -Level SUCCESS } test-log2 |