This repository is template for PoShLog sink. Use it whenever you want to wrap any Serilog sink.
- Run
Generate.ps1 -ProjectTemplateRoot 'Path to template repository' - Enter all information,
Generate.ps1script asks for - New directory with name PoShLog.Sinks.YOUR_SINK_NAME will be created in Template repository parent directory
- Now all you need to do is to write the sink code in
\PoShLog.Sinks.YOUR_SINK_NAME\src\functions\sinks\Add-SinkYOUR_SINK_NAME.ps1 - Finally check module manifest
\PoShLog.Sinks.YOUR_SINK_NAME\src\PoShLog.Sinks.YOUR_SINK_NAME.psd1and\PoShLog.Sinks.YOUR_SINK_NAME\README.mdforTODOplaceholders
- Install
Invoke-Buildmodule:Install-Module InvokeBuild - Run
Invoke-Build . \PoShLog.Sinks.YOUR_SINK_NAME\src\PoShLog.Sinks.YOUR_SINK_NAME.Build.ps1 -ModuleVersion 1.0.0 -ReleaseNotes 'Init', this will create module prepared for publish in.\outputdirectory
- Set your powershellgallery API key in
$env:psgalleryapikeyenvironment variable. - Run
Invoke-Build . \PoShLog.Sinks.YOUR_SINK_NAME\src\PoShLog.Sinks.YOUR_SINK_NAME.Build.ps1 -ModuleVersion 1.0.0 -ReleaseNotes 'Init' -Configuration Prod, this will publish module in powershellgallery.