Skip to content

Commit

Permalink
Merge pull request #371 from Badgerati/develop
Browse files Browse the repository at this point in the history
v1.0.1
  • Loading branch information
Badgerati authored Sep 4, 2019
2 parents 81a828b + d8661e3 commit b10be3a
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 4 deletions.
8 changes: 8 additions & 0 deletions docs/release-notes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Release Notes

## v1.0.1

```plain
### Bugs
* #367: If a "server.psd1" file is not present, Logging will not work
* #368: Logging will attempt to mask everything if no mask patterns are supplied
```

## v1.0.0

```plain
Expand Down
Binary file modified images/example_code_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 4 additions & 2 deletions packers/choco/tools/ChocolateyInstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@ function Install-PodeModule($path, $version)
{
Push-Location (Join-Path $env:ChocolateyPackageFolder 'src')

New-Item -ItemType Directory -Path (Join-Path $path 'Tools') -Force | Out-Null
New-Item -ItemType Directory -Path (Join-Path $path 'Private') -Force | Out-Null
New-Item -ItemType Directory -Path (Join-Path $path 'Public') -Force | Out-Null
New-Item -ItemType Directory -Path (Join-Path $path 'Misc') -Force | Out-Null

Copy-Item -Path ./Tools/* -Destination (Join-Path $path 'Tools') -Force | Out-Null
Copy-Item -Path ./Private/* -Destination (Join-Path $path 'Private') -Force | Out-Null
Copy-Item -Path ./Public/* -Destination (Join-Path $path 'Public') -Force | Out-Null
Copy-Item -Path ./Misc/* -Destination (Join-Path $path 'Misc') -Force | Out-Null
Copy-Item -Path ./Pode.psm1 -Destination $path -Force | Out-Null
Copy-Item -Path ./Pode.psd1 -Destination $path -Force | Out-Null
Expand Down
10 changes: 8 additions & 2 deletions src/Private/Context.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ function New-PodeContext
$ctx.Server.Interval = $Interval
$ctx.Server.PodeModulePath = (Get-PodeModulePath)

# basic logging setup
$ctx.Server.Logging = @{
Enabled = $true
Types = @{}
}

# check if there is any global configuration
$ctx.Server.Configuration = Open-PodeConfiguration -ServerRoot $ServerRoot -Context $ctx

Expand Down Expand Up @@ -265,7 +271,7 @@ function Open-PodeConfiguration

# check the path exists, and load the config
if (Test-PodePath -Path $configPath -NoStatus) {
$config = Import-PowerShellDataFile -Path $configPath
$config = Import-PowerShellDataFile -Path $configPath -ErrorAction Stop
Set-PodeServerConfiguration -Configuration $config.Server -Context $Context
Set-PodeWebConfiguration -Configuration $config.Web -Context $Context
}
Expand Down Expand Up @@ -297,7 +303,7 @@ function Set-PodeServerConfiguration
$Context.Server.Logging = @{
Enabled = !([bool]$Configuration.Logging.Enable)
Masking = @{
Patterns = @($Configuration.Logging.Masking.Patterns)
Patterns = (Remove-PodeEmptyItemsFromArray -Array @($Configuration.Logging.Masking.Patterns))
Mask = (Protect-PodeValue -Value $Configuration.Logging.Masking.Mask -Default '********')
}
Types = @{}
Expand Down

0 comments on commit b10be3a

Please sign in to comment.