Cmdlets - PoShLog/PoShLog GitHub Wiki
Note: All cmdlets marked as EXTENSION must be installed separately! See each cmdlet documentation for more information.
Core cmdlets
- New-Logger - Creates new logger configuraton
- Start-Logger - Creates new instance of logger, that writes to configured sinks
- Close-Logger - Resets Logger to the default and disposes the original if possible
LevelSwitch cmdlets
- New-LevelSwitch - Creates instance of LoggingLevelSwitch at at the initial minimum level
- Set-LevelSwitch - Sets minimum level of given level switch.
- Set-MinimumLevel - Sets current minimum level of logger configuration
Sink cmdlets
- Add-SinkConsole - Writes log events to console host
- Add-SinkPowerShell - Writes log events into PowerShell streams
- Add-SinkFile - Write log events to the specified file
- Add-SinkDataDog - Write log events into DataDog server
EXTENSION - Add-SinkElasticsearch - Write log events into ElasticSearch server
EXTENSION - Add-SinkExceptionless - Write log events into exceptionless.com
EXTENSION - Add-SinkEventLog - Writes log events into Windows Event Log
EXTENSION - Add-SinkElasticsearch - Writes log messages to Elasticsearch
EXTENSION - Add-SinkSeq - Writes log messages to Seq
EXTENSION - Add-SinkMSSqlServer - Writes log messages into MSSQL server databse
EXTENSION - Add-SinkElmahIo - Write log events into elmah.io
EXTENSION
Enrichment cmdlets
- Add-EnrichWithErrorRecord - Enriches log events with ErrorRecord property if available
- Add-EnrichWithProperty - Enriches log events with custom property
- Add-EnrichWithEnvironment - Enriches events with information from the process environment
EXTENSION - Add-EnrichWithExceptionDetails - Adds additional structured properties from exceptions into log events
EXTENSION - Add-EnrichWithProcessId - Enriches log events with current process id
EXTENSION - Add-EnrichWithProcessName - Enriches log events with current process name
EXTENSION
Write cmdlets
- Write-VerboseLog - Write a log event with the Verbose level.
- Write-DebugLog - Write a log event with the Debug level.
- Write-InformationLog - Write a log event with the Information level.
- Write-WarningLog - Write a log event with the Warning level.
- Write-ErrorLog - Write a log event with the Error level.
- Write-FatalLog - Write a log event with the Fatal level.
Formatters
- Get-JsonFormatter - Returns new instance of
Serilog.Formatting.Json.JsonFormatter