Class TransferLogger
Contains logging logic for import/export processing.
Inheritance
Inherited Members
Namespace: EPiServer.Core.Transfer
Assembly: EPiServer.dll
Version: 8.11.0Syntax
public class TransferLogger
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 |
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[] |
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 |