external help file | applicable | schema |
---|---|---|
SharePoint Server 2013, SharePoint Server 2016, SharePoint Online |
2.0.0 |
Turn log tracing on or off
Set-PnPTraceLog -On [<SwitchParameter>]
[-LogFile <String>]
[-Level <LogLevel>]
[-Delimiter <String>]
[-IndentSize <Int>]
[-AutoFlush <Boolean>]
Set-PnPTraceLog -Off [<SwitchParameter>]
Defines if tracing should be turned on. PnP Core, which is the foundation of these cmdlets, uses the standard Trace functionality of .NET. With this cmdlet you can turn capturing of this trace to a log file on or off. Notice that basically only the Provisioning Engine writes to the tracelog which means that cmdlets related to the engine will produce output.
PS:> Set-PnPTraceLog -On -LogFile traceoutput.txt
This turns on trace logging to the file 'traceoutput.txt' and will capture events of at least 'Information' level.
PS:> Set-PnPTraceLog -On -LogFile traceoutput.txt -Level Debug
This turns on trace logging to the file 'traceoutput.txt' and will capture debug events.
PS:> Set-PnPTraceLog -On -LogFile traceoutput.txt -Level Debug -Delimiter ","
This turns on trace logging to the file 'traceoutput.txt' and will write the entries as comma separated. Debug events are captured.
PS:> Set-PnPTraceLog -Off
This turns off trace logging. It will flush any remaining messages to the log file.
Auto flush the trace log. Defaults to true.
Type: Boolean
Parameter Sets: On
Required: False
Position: Named
Accept pipeline input: False
If specified the trace log entries will be delimited with this value.
Type: String
Parameter Sets: On
Required: False
Position: Named
Accept pipeline input: False
Indents in the tracelog will be with this amount of characters. Defaults to 4.
Type: Int
Parameter Sets: On
Required: False
Position: Named
Accept pipeline input: False
The level of events to capture. Possible values are 'Debug', 'Error', 'Warning', 'Information'. Defaults to 'Information'.
Type: LogLevel
Parameter Sets: On
Required: False
Position: Named
Accept pipeline input: False
The path and filename of the file to write the trace log to.
Type: String
Parameter Sets: On
Required: False
Position: Named
Accept pipeline input: False
Turn off tracing to log file.
Type: SwitchParameter
Parameter Sets: Off
Required: True
Position: Named
Accept pipeline input: False
Turn on tracing to log file
Type: SwitchParameter
Parameter Sets: On
Required: True
Position: Named
Accept pipeline input: False