File tree 1 file changed +7
-0
lines changed
1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,10 @@ Start-ScriptLogger
57
57
# Second options, specify multiple custom settings for the logger
58
58
Start-ScriptLogger -Path 'C:\Temp\test.log' -Format '{0:yyyy-MM-dd} {0:HH:mm:ss} {1} {2} {3,-11} {4}' -Level Warning -Encoding 'UTF8' -NoEventLog -NoConsoleOutput
59
59
60
+ # Start a second script logger with a dedicated name. The default script logger
61
+ # is always named 'Default'
62
+ Start-ScriptLogger -Name 'Logger2' -Path 'C:\Temp\test2.log'
63
+
60
64
# Get the current script logger configuration object
61
65
Get-ScriptLogger
62
66
@@ -78,6 +82,9 @@ Write-InformationLog -Message 'My Information Message'
78
82
# Log a verbose message
79
83
Write-VerboseLog -Message 'My Verbose Message'
80
84
85
+ # Write a log message into the log 2
86
+ Write-InformationLog -Name 'Logger2' -Message 'My Information Message in Log 2'
87
+
81
88
# Disable the logger
82
89
Stop-ScriptLogger
83
90
```
You can’t perform that action at this time.
0 commit comments