Skip to content

Commit 502d825

Browse files
committed
Added: The Path parameter for Start-ScriptLogger can now be an empty string
1 parent 024fbf2 commit 502d825

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
55
The format is mainly based on [Keep a Changelog](http://keepachangelog.com/)
66
and this project adheres to [Semantic Versioning](http://semver.org/).
77

8+
## 3.2.0 - 2019-08-29
9+
10+
* Added: The Path parameter for Start-ScriptLogger can now be an empty string
11+
812
## 3.1.0 - 2019-02-18
913

1014
* Added: Optional log rotation (hourly, daily, monthly, yearly)

Modules/ScriptLogger/Functions/Start-ScriptLogger.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ function Start-ScriptLogger
5555

5656
# The path to the log file.
5757
[Parameter(Mandatory = $false)]
58+
[AllowEmptyString()]
5859
[System.String]
5960
$Path,
6061

@@ -111,7 +112,7 @@ function Start-ScriptLogger
111112

112113
# If the Path parameter was not specified, add a default value. If possible,
113114
# use the last script called this function. Else use the temp path.
114-
if (-not $PSBoundParameters.ContainsKey('Path'))
115+
if (-not $PSBoundParameters.ContainsKey('Path') -or [System.String]::IsNullOrEmpty($Path))
115116
{
116117
$lastScriptPath = Get-PSCallStack | Select-Object -Skip 1 -First 1 -ExpandProperty 'ScriptName'
117118

Modules/ScriptLogger/ScriptLogger.psd1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
RootModule = 'ScriptLogger.psm1'
44

55
# Version number of this module.
6-
ModuleVersion = '3.1.0'
6+
ModuleVersion = '3.2.0'
77

88
# Supported PSEditions
99
# CompatiblePSEditions = @()
@@ -111,7 +111,7 @@
111111
# IconUri = ''
112112

113113
# ReleaseNotes of this module
114-
# ReleaseNotes = ''
114+
ReleaseNotes = 'https://github.com/claudiospizzi/ScriptLogger/blob/master/CHANGELOG.md'
115115

116116
} # End of PSData hashtable
117117

0 commit comments

Comments
 (0)