test/02.eventlog.ps1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
Import-Module ..\uLog.psd1 -WarningAction SilentlyContinue -Force function test-log2 { Remove-Variable -Name uLOG -ErrorAction SilentlyContinue $log = New-uLog $log.AddLogHandler( (New-uLogEventLog -Keep:$false) ) 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 |