We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 59f14c2 commit 4fdffc3Copy full SHA for 4fdffc3
Examples/LoggerDemo.ps1
@@ -2,8 +2,14 @@
2
# Initialize the logger with default values
3
Start-ScriptLogger
4
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
+# Second options, specify multiple custom settings for the logger
+Start-ScriptLogger -Path 'C:\Temp\test.log' -Format '{0:yyyy-MM-dd} {0:HH:mm:ss} {1} {2} {3,-11} {4}' -Level Warning -SkipEventLog -HideConsoleOutput
7
+
8
+# Get the current script logger configuration object
9
+Get-ScriptLogger
10
11
+# Update the script logger configuration
12
+Set-ScriptLogger -Level Verbose
13
14
# Log an error message
15
Write-ErrorLog -Message 'My Error Message'
0 commit comments