Search Results for

    Show / Hide Table of Contents

    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.Boolean includeDebugEntries

    Properties

    Logs

    Get the single List<LogEntry> instance, singleton pattern

    Declaration
    public static List<Tuple<LogLevel, LogEntry>> Logs { get; }
    Property Value
    List<Tuple<LogLevel, LogEntry>>

    Methods

    Debug(LogEntry)

    Output on any warnings generated by the transform process

    Declaration
    public void Debug(LogEntry entry)
    Parameters
    LogEntry entry

    Implements
    ILogObserver.Debug(LogEntry)

    Error(LogEntry)

    Errors

    Declaration
    public void Error(LogEntry entry)
    Parameters
    LogEntry entry

    Implements
    ILogObserver.Error(LogEntry)

    Flush()

    Output a summary to the console

    Declaration
    public void Flush()
    Implements
    ILogObserver.Flush()

    Flush(Boolean)

    Output a summary to the console

    Declaration
    public void Flush(bool clearLogData)
    Parameters
    System.Boolean clearLogData

    Also clear the log data

    Implements
    ILogObserver.Flush(Boolean)

    Info(LogEntry)

    Output on operations throughout the transform process

    Declaration
    public void Info(LogEntry entry)
    Parameters
    LogEntry entry

    Implements
    ILogObserver.Info(LogEntry)

    SetPageId(String)

    Sets the id of the page that's being transformed

    Declaration
    public void SetPageId(string pageId)
    Parameters
    System.String pageId

    Id of the page

    Implements
    ILogObserver.SetPageId(String)

    Warning(LogEntry)

    Output on any warnings generated by the transform process

    Declaration
    public void Warning(LogEntry entry)
    Parameters
    LogEntry entry

    Implements
    ILogObserver.Warning(LogEntry)

    Write(String, ConsoleColor)

    Central method to output to console

    Declaration
    public void Write(string message, ConsoleColor color = null)
    Parameters
    System.String message

    ConsoleColor color

    Foreground console color

    Extension Methods

    ValidationExtensions.ValidateNotNullOrEmpty<T>(T, String)
    ObjectExtensions.Set<TObject, T>(TObject, Expression<Func<TObject, T>>, T, Boolean, Boolean)
    ObjectExtensions.GetPublicInstancePropertyValue(Object, String)
    ObjectExtensions.GetPublicInstanceProperty(Object, String)
    ObjectExtensions.SetPublicInstancePropertyValue(Object, String, Object)
    Extensions.ToByteArray(Object)
    Back to top PnP Framework
    Generated by DocFX with Material UI
    spacer