test/10.log_header.ps1
<#
This example demonstrates the use of Header. Header contains basic information about the computer, user and PowerShell version. By default, it is printed beaucause it is of great use when debugging To remove the default header, use -NoHeader parameter #> Write-Host "EXAMPLE 10" Import-Module ..\uLog.psd1 -Force Remove-Variable -Name uLOG -ErrorAction SilentlyContinue Remove-Variable -Name Log -ErrorAction SilentlyContinue Write-Host "Exemple 10.1 - with header" $log = New-uLog Log-Info -Message 'Hello' Write-Host "Exemple 10.2 - no header" $log = New-uLog -NoHeader Log-Info -Message 'Hello' Write-Host "Exemple 10.3 - back to no header" $log = New-uLog -Handler (New-uLogConsole), (New-uLogFile -Name temp -Path 'c:\temp\10.log_header.ps1.log') Log-Info -Message 'Hello' |