ottomatt - Log4Posh 3.0.1
A log4net wrapper for PowerShell
PM> Install-Package Log4Posh -Version 3.0.1 -Source https://www.myget.org/F/ottomatt/api/v3/index.json
> nuget.exe install Log4Posh -Version 3.0.1 -Source https://www.myget.org/F/ottomatt/api/v3/index.json
> dotnet add package Log4Posh --version 3.0.1 --source https://www.myget.org/F/ottomatt/api/v3/index.json
> choco install Log4Posh --version 3.0.1 --source https://www.myget.org/F/ottomatt/api/v2
Import-Module PowerShellGet
Register-PSRepository -Name "ottomatt" -SourceLocation "https://www.myget.org/F/ottomatt/api/v2"
Install-Module -Name "Log4Posh" -RequiredVersion "3.0.1" -Repository "ottomatt"
Copy to clipboard
Log4Posh
A log4net wrapper for PowerShell. Support .NET Core 1.0 / .NET Standard 1.3
French documentation. Principe et configuration
To install this module :
$PSGalleryPublishUri = 'https://www.myget.org/F/ottomatt/api/v2/package'
$PSGallerySourceUri = 'https://www.myget.org/F/ottomatt/api/v2'
Register-PSRepository -Name OttoMatt -SourceLocation $PSGallerySourceUri -PublishLocation $PSGalleryPublishUri #-InstallationPolicy Trusted
Install-Module Log4Posh -Repository OttoMatt
2018-05-18 Version 3.0.1 Fix function Start-Log4Net When the module was loaded from an UNC path, the constructor of the class System.IO.fileInfo raised a NotSupportedException exception.
2018-05-06 Version 3.0.0 Breaking change The function Initialize-Log4Net dot not use script scope by default with a xml configuration ($XmlConfigPath) The caller, in the case of a module using its own loggers, must specify the scope 'Script'
The following code :
$InitializeLogging=[scriptblock]::Create("${function:Initialize-Log4Net}")
$Params=@{
RepositoryName = $Script:lg4n_ModuleName
XmlConfigPath = "$psScriptRoot\Log4Net.Config.xml"
DefaultLogFilePath = "$psScriptRoot\Logs\${Script:lg4n_ModuleName}.log"
}
&$InitializeLogging @Params
becomes \(InitializeLogging=[scriptblock]::Create("\)") $Params=@ &$InitializeLogging @Params
Add Function Get-DefaultRepository : return the d�fault repository. See Get-DefaultRepositoryName Get-Log4NetLogger : add -All parameter. Return all loggers of a repository
Change Get-Log4NetAppenderFileName : rename the parameter 'ModuleName' to 'RepositoryName' rename the alias 'RepositoryName' to 'ModuleName'
2017-08-11 Version 2.2.0 Change The functions Initialize-Log4NetModule and Initialize-Log4NetScript are obsolete. Use instead the function Initialize-Log4Net.
function Initialize-Log4NetModule
The $DefaultLogFilePath parameter is no longer mandatory.
We use by default the file names defined in the xml file.
The $DefaultLogFile variable is obsolete.
Use instead the function Get-Log4NetFileAppender
function Get-Log4NetAppenderFileName
Add -All parameter.
Returns the current path of the internal and external log files of a repository.
Fix function Get-Log4NetFileAppender The required parameter -Repository can not have a default value.
function Start-Log4Net
When the internal log of Log4Net is activated, the API [Log4net.Config.XmlConfigurator]::Configure()
return Error and Log in the same collection.
We must filter the $Result collection on the 'Prefix' member.
2017-05-22 Version 2.1.2 Fix In the manifest the key 'VariableToExport' need Export-ModuleMember -Variable * -Function * -Alias *
2017-05-15 Version 2.1.1 Fix Start-Log4Net: XmlConfigurator use [Environment]::CurrentDirectory not the Powershell location
Add Function New-Log4NetCoreLevel : Create a personalized level. Comment about the ETS members French tutoriel about Log4net with Powershell
Change Throw to $PSCmdlet.ThrowTerminatingError.
2017-04-29 Version 2.1.0 Fix PSSA rules Creating indirectly the default repository
Add Support for .NET Core 1.0 Build tasks Translation Log4net licence
Change Start-Log4Net : Add Test-Path for the xml configuration file. Pester tests Throw to $PSCmdlet.ThrowTerminatingError. Remove Export-ModuleMember use instead the manifest Export functions 'Set-LogDebugging' and 'Get-LogDebugging' Use Log4Net version 2.0.8.0 Core : Now we must create the default repository 'log4net-default-repository' Use Publish-Module instead PSNuspec
2017-02-11 Version 2.0.1 Change Reorganization of the repository for the build
Fix: function Initialize-Log4NetModule : the call of New-item must use the -PATH parameter.
2016-09-24 Version 2.0.0 Fix: the initialization of the code injection build script the the log file name into demo files.
Add: functions Set-LogDebugging and Get-LogDebugging Nuspec4 file icon for nuget package Changelog.md et releasesnotes.md file
Change: Start-Log4Net now fire Error instead Warning (prevent silent failure of log4net) the assembly directories (On Github only) Pds1 key 'FunctionsToExport'
Remove : Commented code (PSObjectRenderer) Alias 'swtafn'
2016-08-06 Version 1.2.0.0 Refactoring : loading dll by the dotnet version ($psversiontable.CLRVersion)
2014-03-27 Version 1.1.0.0 Add PSDebug method, refactoring : use a Log4net repository for each module
2014-03-01 Version 1.0.0.0 Original version
OwnersLaurent Dardenne |
AuthorsLaurent Dardenne |
Project URLhttps://github.com/LaurentDardenne/Log4Posh |
LicenseUnknown |
TagsPSEdition_Desktop PSEdition_Core PSModule PSIncludes_Function PSFunction_ConvertTo-Log4NetCoreLevel PSFunction_Get-Log4NetAppenderFileName PSFunction_Get-DefaultAppenderFileName PSFunction_Get-DefaultRepositoryName PSFunction_Get-Log4NetShortcuts PSFunction_Get-Log4NetLogger PSFunction_Get-Log4NetFileAppender PSFunction_Get-ParentProcess PSFunction_Get-Log4NetRepository PSFunction_Initialize-Log4NetModule PSFunction_Initialize-Log4NetScript PSFunction_Initialize-Log4Net PSFunction_Start-Log4Net PSFunction_Stop-Log4Net PSFunction_Set-Log4NetAppenderFileName PSFunction_Set-Log4NetRepositoryThreshold PSFunction_Set-Log4NetLoggerLevel PSFunction_Set-Log4NetAppenderThreshold PSFunction_Stop-ConsoleAppender PSFunction_Start-ConsoleAppender PSFunction_Switch-AppenderFileName PSFunction_Test-Repository PSFunction_Set-LogDebugging PSFunction_Get-LogDebugging PSFunction_New-Log4NetCoreLevel PSFunction_Get-DefaultRepository PSCommand_ConvertTo-Log4NetCoreLevel PSCommand_Get-Log4NetAppenderFileName PSCommand_Get-DefaultAppenderFileName PSCommand_Get-DefaultRepositoryName PSCommand_Get-Log4NetShortcuts PSCommand_Get-Log4NetLogger PSCommand_Get-Log4NetFileAppender PSCommand_Get-ParentProcess PSCommand_Get-Log4NetRepository PSCommand_Initialize-Log4NetModule PSCommand_Initialize-Log4NetScript PSCommand_Initialize-Log4Net PSCommand_Start-Log4Net PSCommand_Stop-Log4Net PSCommand_Set-Log4NetAppenderFileName PSCommand_Set-Log4NetRepositoryThreshold PSCommand_Set-Log4NetLoggerLevel PSCommand_Set-Log4NetAppenderThreshold PSCommand_Stop-ConsoleAppender PSCommand_Start-ConsoleAppender PSCommand_Switch-AppenderFileName PSCommand_Test-Repository PSCommand_Set-LogDebugging PSCommand_Get-LogDebugging PSCommand_New-Log4NetCoreLevel PSCommand_Get-DefaultRepository PSCommand_saca PSCommand_spca |
Info303 total downloads |
4 downloads for version 3.0.1 |
Download (805.23 KB) |
Found on the current feed only |
Package history
Version | Size | Last updated | Downloads | Mirrored? | |||
---|---|---|---|---|---|---|---|
3.0.5 | 819.76 KB | Sun, 22 Sep 2019 10:02:24 GMT | 159 | ||||
3.0.4 | 817.56 KB | Sat, 12 Jan 2019 18:26:50 GMT | 70 | ||||
3.0.3 | 808.53 KB | Fri, 17 Aug 2018 11:51:28 GMT | 22 | ||||
3.0.2 | 806.32 KB | Sun, 15 Jul 2018 11:31:47 GMT | 6 | ||||
3.0.1 | 805.23 KB | Thu, 14 Jun 2018 18:28:29 GMT | 4 | ||||
2.2.0 | 787.03 KB | Mon, 28 Aug 2017 22:05:52 GMT | 42 |