cete.dynamicpdf.htmlconverter.logconfig
LogConfig
- Namespace: ceTe.DynamicPDF.HtmlConverter
- Assemblies: DynamicPDF.HTMLConverter.dll
Stores information about how logging will be done or not done at all.
public class LogConfig
Public Class LogConfig
Inheritance: Object → LogConfig
Licensing Info
This class is a DynamicPDF HTML Converter feature. One of the following is required for non-evaluation usage:
- Any active DynamicPDF Subscription (Essentials, Professional, Professional Plus or Ultimate).
- A DynamicPDF HTML Converter for .NET v3.X Essentials license.
- It can also be used for free with a public link back to www.dynamicpdf.com and with the DynamicPDF Essentials message displaying on the bottom of each page.
Examples
Example shows how to use LogConfig class.
Imports ceTe.DynamicPDF.Conversion
Module Module1
Sub Main()
ConversionOptions.Logging.Level = LogLevel.Information
ConversionOptions.Logging.LogFilePath = "C:\temp\LogFile.txt"
' Call convert method to do conversion.
Converter.Convert("<h1>Hello World</h1>", "C:\MyOutput.pdf")
End Sub
End Module
using ceTe.DynamicPDF.Conversion;
class MyClass
{
static void Main()
{
ConversionOptions.Logging.Level = LogLevel.Information;
ConversionOptions.Logging.LogFilePath = @"C:\temp\LogFile.txt";
//Call Convert method to start conversion
Converter.Convert(@"<h1>Hello World</h1>", @"C:\MyOutput.pdf");
}
}
Constructors
LogConfig()
Initializes a new instance of the LogConfig class.
public LogConfig()
Public Sub New ()
Licensing Info
This constructor is a DynamicPDF HTML Converter feature. One of the following is required for non-evaluation usage:
- Any active DynamicPDF Subscription (Essentials, Professional, Professional Plus or Ultimate).
- A DynamicPDF HTML Converter for .NET v3.X Essentials license.
- It can also be used for free with a public link back to www.dynamicpdf.com and with the DynamicPDF Essentials message displaying on the bottom of each page.
Properties
Level
Gets or sets one of LogLevel to indicate the amount of logs to be written. Default is LogLevel.None which means no logs will be written.
public LogLevel Level { get; set; }
Public Property Level As LogLevel
Property Value
Licensing Info
This property is a DynamicPDF HTML Converter feature. One of the following is required for non-evaluation usage:
- Any active DynamicPDF Subscription (Essentials, Professional, Professional Plus or Ultimate).
- A DynamicPDF HTML Converter for .NET v3.X Essentials license.
- It can also be used for free with a public link back to www.dynamicpdf.com and with the DynamicPDF Essentials message displaying on the bottom of each page.
LogAction
Gets or sets a LoggerDelegate which will be called for each log entry. Default is an internal mathod which writes to Trace for Client and Event log on Windows Service.
public LoggerDelegate LogAction { get; set; }
Public Property LogAction As LoggerDelegate
Property Value
Licensing Info
This property is a DynamicPDF HTML Converter feature. One of the following is required for non-evaluation usage:
- Any active DynamicPDF Subscription (Essentials, Professional, Professional Plus or Ultimate).
- A DynamicPDF HTML Converter for .NET v3.X Essentials license.
- It can also be used for free with a public link back to www.dynamicpdf.com and with the DynamicPDF Essentials message displaying on the bottom of each page.
LogFilePath
Gets or sets the path to a file which will be appended to for each log entry.
public string LogFilePath { get; set; }
Public Property LogFilePath As String
Property Value
Licensing Info
This property is a DynamicPDF HTML Converter feature. One of the following is required for non-evaluation usage:
- Any active DynamicPDF Subscription (Essentials, Professional, Professional Plus or Ultimate).
- A DynamicPDF HTML Converter for .NET v3.X Essentials license.
- It can also be used for free with a public link back to www.dynamicpdf.com and with the DynamicPDF Essentials message displaying on the bottom of each page.
Examples
Example shows how to use LogFilePath property.
Imports ceTe.DynamicPDF.Conversion
Module Module1
Sub Main()
ConversionOptions.Logging.Level = LogLevel.Information
ConversionOptions.Logging.LogFilePath = "C:\temp\LogFile.txt"
' Call convert method to do conversion.
Converter.Convert("<h1>Hello World</h1>", "C:\MyOutput.pdf")
End Sub
End Module
using ceTe.DynamicPDF.Conversion;
class MyClass
{
static void Main()
{
ConversionOptions.Logging.Level = LogLevel.Information;
ConversionOptions.Logging.LogFilePath = @"C:\temp\LogFile.txt";
//Call Convert method to start conversion
Converter.Convert(@"<h1>Hello World</h1>", @"C:\MyOutput.pdf");
}
}
Remarks
If LogAction is to be used then this should not be assigned. Setting this property also assign the LogAction with an internal method for logging to file.
Methods
Equals(Object)
Determines whether the specified Object is equal to the current Object . (Inherited from Object)
public bool Equals(Object obj)
Function Equals(obj As Object) As Boolean
Parameters
- obj: Object
The Object to compare with the current Object .
Returns
true if the specified Object is equal to the current Object ; otherwise, false.
Licensing Info
This method is a DynamicPDF HTML Converter feature. One of the following is required for non-evaluation usage:
- Any active DynamicPDF Subscription (Essentials, Professional, Professional Plus or Ultimate).
- A DynamicPDF HTML Converter for .NET v3.X Essentials license.
- It can also be used for free with a public link back to www.dynamicpdf.com and with the DynamicPDF Essentials message displaying on the bottom of each page.
GetHashCode()
Serves as a hash function for a particular type. (Inherited from Object)
public int GetHashCode()
Function GetHashCode() As Integer
Returns
A hash code for the current Object .
Licensing Info
This method is a DynamicPDF HTML Converter feature. One of the following is required for non-evaluation usage:
- Any active DynamicPDF Subscription (Essentials, Professional, Professional Plus or Ultimate).
- A DynamicPDF HTML Converter for .NET v3.X Essentials license.
- It can also be used for free with a public link back to www.dynamicpdf.com and with the DynamicPDF Essentials message displaying on the bottom of each page.
GetType()
Gets the Type of the current instance. (Inherited from Object)
public Type GetType()
Function GetType() As Type
Returns
The Type instance that represents the exact runtime type of the current instance.
Licensing Info
This method is a DynamicPDF HTML Converter feature. One of the following is required for non-evaluation usage:
- Any active DynamicPDF Subscription (Essentials, Professional, Professional Plus or Ultimate).
- A DynamicPDF HTML Converter for .NET v3.X Essentials license.
- It can also be used for free with a public link back to www.dynamicpdf.com and with the DynamicPDF Essentials message displaying on the bottom of each page.
ToString()
Returns a String that represents the current Object . (Inherited from Object)
public string ToString()
Function ToString() As String
Returns
A String that represents the current Object .
Licensing Info
This method is a DynamicPDF HTML Converter feature. One of the following is required for non-evaluation usage:
- Any active DynamicPDF Subscription (Essentials, Professional, Professional Plus or Ultimate).
- A DynamicPDF HTML Converter for .NET v3.X Essentials license.
- It can also be used for free with a public link back to www.dynamicpdf.com and with the DynamicPDF Essentials message displaying on the bottom of each page.