Skip to content

Commit 21e2d8f

Browse files
committed
Update logger demo with new parameters
1 parent fdd6181 commit 21e2d8f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Examples/LoggerDemo.ps1

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22
# Initialize the logger with default values
33
Start-ScriptLogger
44

5-
# Alternative: Specify all possible parameters for the logger
6-
Start-ScriptLogger -Path 'C:\Temp\test.log' -Format '{0:yyyy-MM-dd} {0:HH:mm:ss} {1} {2} {3,-11} {4}' -Level 'Verbose' -SkipEventLog -HideConsoleOutput
5+
# Alternative: Specify all possible parameters for the logger. Of course, this
6+
# will not log anything, if you disable the log file, the event log and the
7+
# console output at the same time.
8+
Start-ScriptLogger -Path 'C:\Temp\test.log' -Format '{0:yyyy-MM-dd} {0:HH:mm:ss} {1} {2} {3,-11} {4}' -Level 'Verbose' -NoLogFile -NoEventLog -NoConsoleOutput
79

810
# Log an error message
911
Write-ErrorLog -Message 'My Error Message'

0 commit comments

Comments
 (0)