# LogParams Class

> Defines the parameters for writing error messages to a log file.

- Product: Adobe PDF Library 21
- Language: .NET Framework
- Version: APDFL21.0.0PlusP1e
- HTML page: https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/class/LogParams
- Version index: https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/llms.txt

```csharp
class LogParams : SystemIDisposable
```

**Namespace:** `Datalogics::PDFL`

**Inherits from:** `SystemIDisposable`

## Description

Defines the parameters for writing error messages to a log file.

The messages include the date and time, the source of the error, and the error type: debug, info, warning, error, or fatal. This class also defines the log file name and path.

**Referenced by:** [`Library`](https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/class/Library.md)

**Uses types:** [`LogOutputFlags`](https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/enum/LogOutputFlags.md)

## Constructors

### LogParams

```csharp
Datalogics.PDFL.LogParams.LogParams()
```

*constructor*

LogParams constructor which allows to create LogParams instance.

The LogParams object contains all settings required for logging. The log output, log file name and log string format can be configured with it.

## Properties

### LogFileName

```csharp
string Datalogics.PDFL.LogParams.LogFileName { get; set; }
```

Gets the path to the file to write the log to.

### LogFormat

```csharp
string Datalogics.PDFL.LogParams.LogFormat { get; set; }
```

Gets log format string. The string which allows to write the log in a custom format.

NOTE: PDFL supports the following markers to form output string:

"%d" - current date (mmddyyyy). Example: 07292013 "%t" - current time (hhmmss). Example: 121311 "%s" - error source. Example: "DLFramework" "%e" - error type. It can be debug, info, warning, error, fatal. The value which will be output within this marker depends on severity value. It always outputs "error" string.

"%m" - error message. Example: "Exception: InExistent.pdf: This file cannot be found. Error number: 1074397201" "%T" - full date. It contains current date, current time and the timezone (yyyy-mm-ddThh:mm:ss+/-hh:mm). Example: 2013-07-29T12:13:11+03:00

By default "%T | %s | %e | %m" string format is used.

### LogOutputFlags

```csharp
LogOutputFlags Datalogics.PDFL.LogParams.LogOutputFlags { get; set; }
```

Gets LogOutputFlags.

Supported types of logging are: console, file and Event Log (for Windows only). The outputs can be mixed by ORing corresponding flags. It is also possible to suppress any logging using LogOutputFlags.None.

## Methods

### Dispose

```csharp
void Datalogics.PDFL.LogParams.Dispose()
```

**Returns:** `void`
