You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: documentation/Get-PnPTraceLog.md
+20-2
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,9 @@ Get-PnPTraceLog [-Verbose]
26
26
```
27
27
28
28
## DESCRIPTION
29
-
This cmdlet returns the logged messages during the execution of PnP PowerShell cmdlets. It can return the messages from an in memory log stream or from a file. You can use [Start-PnPTraceLog](Start-PnPTraceLog.md) to start logging to a file and/or to an in memory stream.
29
+
This cmdlet returns the logged messages during the execution of PnP PowerShell cmdlets. It can return the messages from an in memory log stream or from a file. Note that you cannot read from a log file if it is currently in use to write to. In this case, you would first have to stop logging to it using [Stop-PnPTraceLog](Stop-PnPTraceLog.md) and then read the log file. The in memory log stream is always available.
30
+
31
+
You can use [Start-PnPTraceLog](Start-PnPTraceLog.md) to start logging to a file and/or to an in memory stream.
30
32
31
33
## EXAMPLES
32
34
@@ -42,7 +44,7 @@ This returns all items in the in memory stored log stream
42
44
Get-PnPTraceLog -Path "C:\temp\log.txt"
43
45
```
44
46
45
-
This returns all items from the log file stored at the provided location
47
+
This returns all items from the log file stored at the provided location. Note that you cannot read from a log file if it is currently in use to write to. In this case, you would first have to stop logging to it using [Stop-PnPTraceLog](Stop-PnPTraceLog.md) and then read the log file.
This returns only logged items from the in memory stored log stream that happened during the execution of a PnP PowerShell cmdlet with the provided correlation id. This is useful to find out what happened during the execution of a specific cmdlet. Mind that the correlation id is an unique identifier for the cmdlet execution assigned by PnP PowerShell and is not the same as the correlation id of a SharePoint operation.
Returns the 10 longest running operations from the in memory stored log stream. The output is sorted by the EllapsedMilliseconds property in descending order. The output is limited to the properties EllapsedMilliseconds, Source and Message.
Returns the top 5 longest running cmdlets from the in memory stored log stream. The output is sorted by the TimeTaken property in descending order. The output is limited to the properties Started, Ended, Cmdlet, TimeTaken and Logs. The Logs property contains all logged items for the specific cmdlet
76
+
61
77
## PARAMETERS
62
78
63
79
### -Path
64
80
The path to the log file. If not provided, the cmdlet will return the in memory log stream.
65
81
82
+
Note that you cannot read from a log file if it is currently in use to write to. In this case, you would first have to stop logging to it using [Stop-PnPTraceLog](Stop-PnPTraceLog.md) and then read the log file.
0 commit comments