Class MarkdownObserver
Markdown observer intended for end-user output
Inheritance
System.Object
MarkdownObserver
Namespace: PnP.Framework.Modernization.Telemetry.Observers
Assembly: PnP.Framework.dll
Syntax
public class MarkdownObserver : object, ILogObserver
Constructors
MarkdownObserver(String, String, Boolean, Boolean)
Constructor for specifying to include debug entries
Declaration
public MarkdownObserver(string fileName = "", string folder = "", bool includeDebugEntries = false, bool includeVerbose = false)
Parameters
System. Name used to construct the log file name |
System. Folder that will hold the log file |
System. Include Debug Log Entries |
System. Include verbose details |
Fields
_includeDebugEntries
Declaration
protected bool _includeDebugEntries
Field Value
System.
|
_includeVerbose
Declaration
protected bool _includeVerbose
Field Value
System.
|
_pageBeingTransformed
Declaration
protected string _pageBeingTransformed
Field Value
System.
|
_reportDate
Declaration
protected DateTime _reportDate
Field Value
Date
|
_reportFileName
Declaration
protected string _reportFileName
Field Value
System.
|
_reportFolder
Declaration
protected string _reportFolder
Field Value
System.
|
Properties
Logs
Get the single List<LogEntry> instance, singleton pattern
Declaration
public static List<Tuple<LogLevel, LogEntry>> Logs { get; }
Property Value
Methods
Debug(LogEntry)
Debug level of data not recorded unless in debug mode
Declaration
public void Debug(LogEntry entry)
Parameters
Log
|
Implements
Error(LogEntry)
Flush()
Output the report when flush is called
Declaration
public virtual void Flush()
Implements
Flush(Boolean)
Output the report when flush is called
Declaration
public virtual void Flush(bool clearLogData)
Parameters
System. Also clear the log data |
Implements
GenerateReportWithSummaryAtTop(Boolean)
Generates a markdown based report based on the logs
Declaration
protected virtual string GenerateReportWithSummaryAtTop(bool includeHeading = true)
Parameters
System.
|
Returns
System.
|
GenerateReportWithSummaryAtTopDetails(StringBuilder, IEnumerable<Tuple<LogLevel, LogEntry>>)
Declaration
protected virtual string GenerateReportWithSummaryAtTopDetails(StringBuilder report, IEnumerable<Tuple<LogLevel, LogEntry>> distinctLogs)
Parameters
Returns
System.
|
Info(LogEntry)
Reporting operations throughout the transform process
Declaration
public void Info(LogEntry entry)
Parameters
Log
|
Implements
SetPageId(String)
Sets the id of the page that's being transformed
Declaration
public void SetPageId(string pageId)
Parameters
System. Id of the page |
Implements
Warning(LogEntry)
Report on any warnings generated by the reporting tool
Declaration
public void Warning(LogEntry entry)
Parameters
Log
|