Class ConsoleObserver
Logger that logs to the console output
Inheritance
System.Object
ConsoleObserver
Namespace: PnP.Framework.Modernization.Telemetry.Observers
Assembly: PnP.Framework.dll
Syntax
public class ConsoleObserver : object, ILogObserver
Constructors
ConsoleObserver(Boolean)
Console Observer constructor
Declaration
public ConsoleObserver(bool includeDebugEntries = false)
Parameters
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)
Output on any warnings generated by the transform process
Declaration
public void Debug(LogEntry entry)
Parameters
Log
|
Implements
Error(LogEntry)
Flush()
Flush(Boolean)
Output a summary to the console
Declaration
public void Flush(bool clearLogData)
Parameters
System. Also clear the log data |
Implements
Info(LogEntry)
Output on 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)
Output on any warnings generated by the transform process
Declaration
public void Warning(LogEntry entry)
Parameters
Log
|
Implements
Write(String, ConsoleColor)
Central method to output to console
Declaration
public void Write(string message, ConsoleColor color = null)
Parameters
System.
|
Console Foreground console color |