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 fdd6181 commit 21e2d8fCopy full SHA for 21e2d8f
Examples/LoggerDemo.ps1
@@ -2,8 +2,10 @@
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
+# Alternative: Specify all possible parameters for the logger. Of course, this
+# 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
9
10
# Log an error message
11
Write-ErrorLog -Message 'My Error Message'
0 commit comments