November Happy Hour will be moved to Thursday December 5th.

Class TransferLogger

Contains logging logic for import/export processing.

Inheritance
System.Object
TransferLogger
Implements
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Core.Transfer
Assembly: EPiServer.dll
Version: 11.20.7
Syntax
public class TransferLogger : ITransferLogger

Constructors

TransferLogger(ITransferHandlerContext)

Initializes a new instance of the TransferLogger class.

Declaration
public TransferLogger(ITransferHandlerContext transferContext)
Parameters
Type Name Description
ITransferHandlerContext transferContext

The transfer context.

Properties

Context

Set a context or prefix used for logging.

Declaration
public string Context { get; set; }
Property Value
Type Description
System.String

CountHandledFiles

Gets or sets the number of handled files.

Declaration
public int CountHandledFiles { get; set; }
Property Value
Type Description
System.Int32

The number of handled files.

Errors

A collection of errors that has been added by calls to the LogError method.

Declaration
public StringCollection Errors { get; }
Property Value
Type Description
System.Collections.Specialized.StringCollection

MergedFolders

Gets a list of all folders that have been merged during import

Declaration
public IEnumerable<Guid> MergedFolders { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<System.Guid>

Status

Gets the status for the export/import process.

Declaration
public StatusInfo Status { get; }
Property Value
Type Description
StatusInfo

The status.

TransferContext

Gets or sets the transfer context for the import/export.

Declaration
public ITransferHandlerContext TransferContext { get; set; }
Property Value
Type Description
ITransferHandlerContext

The transfer context.

Warnings

A collection of warnings that has been added by calls to the LogWarning method.

Declaration
public StringCollection Warnings { get; }
Property Value
Type Description
System.Collections.Specialized.StringCollection

Methods

AddPage(Guid, StatusInfo.StatusInfoAction)

Adds an identifier for an imported page to the log.

Declaration
public void AddPage(Guid id, StatusInfo.StatusInfoAction infoAction)
Parameters
Type Name Description
System.Guid id

The page GUID.

StatusInfo.StatusInfoAction infoAction

The action type

AddPagePrototype(Guid)

Adds a identifier for a page prototype.

Declaration
public void AddPagePrototype(Guid id)
Parameters
Type Name Description
System.Guid id

The identifier for the prototype.

Error(String, Exception, Object[])

Log a error message.

Declaration
public void Error(string errormsg, Exception e, params object[] args)
Parameters
Type Name Description
System.String errormsg

The error message

System.Exception e

The generated exception message

System.Object[] args

Optional arguments.

GetCreatedPrototypes()

Gets a copy of the created prototypes, this function are going to return all pages that is or has been a prototype.

Declaration
public Guid[] GetCreatedPrototypes()
Returns
Type Description
System.Guid[]

GetInformationLog(StatusInfo.StatusInfoAction)

Gets log messages about a specific action

Declaration
public StringCollection GetInformationLog(StatusInfo.StatusInfoAction action)
Parameters
Type Name Description
StatusInfo.StatusInfoAction action
Returns
Type Description
System.Collections.Specialized.StringCollection

GetPages(StatusInfo.StatusInfoAction)

Gets a copy of all imported pages.

Declaration
public Guid[] GetPages(StatusInfo.StatusInfoAction infoAction)
Parameters
Type Name Description
StatusInfo.StatusInfoAction infoAction

The action type

Returns
Type Description
System.Guid[]

The number of imported pages.

Remarks

This is a thread safe lazy strong typed version of the backing data EPiServer.Util.StatusInfo.importedPagesId "/>

Progress(String, Object[])

Log a debug message about the progress.

Declaration
public void Progress(string logmsg, params object[] args)
Parameters
Type Name Description
System.String logmsg
System.Object[] args

Warning(String, Exception, Object[])

Log warning and exception

Declaration
public void Warning(string warning, Exception e, params object[] args)
Parameters
Type Name Description
System.String warning
System.Exception e
System.Object[] args

Warning(String, Object[])

Log a warning message.

Declaration
public void Warning(string warning, params object[] args)
Parameters
Type Name Description
System.String warning
System.Object[] args

Implements

Extension Methods