# LogParams Class

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

- Product: Adobe PDF Library 18
- Language: Java
- Version: APDFL18.0.5PlusP2e
- HTML page: https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/LogParams
- Version index: https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/llms.txt

```java
class LogParams
```

**Namespace:** `com::datalogics::PDFL`

## 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/apdfl18/Java/APDFL18.0.5PlusP2e/class/Library.md)

## Constructors

### LogParams

```java
com.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.

## Methods

### delete

```java
synchronized void com.datalogics.PDFL.LogParams.delete(Boolean disposing)
```

*protected*

**Parameters**

- `disposing` (`Boolean`)

**Returns:** `synchronized void`

### delete

```java
synchronized void com.datalogics.PDFL.LogParams.delete()
```

**Returns:** `synchronized void`

### finalize

```java
void com.datalogics.PDFL.LogParams.finalize()
```

*protected*

**Returns:** `void`

### getLogFileName

```java
String com.datalogics.PDFL.LogParams.getLogFileName()
```

**Returns:** `String`

Path to the file to write the log to.

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

### getLogFormat

```java
String com.datalogics.PDFL.LogParams.getLogFormat()
```

**Returns:** `String`

string Log record format.

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.

### getLogOutputFlags

```java
java.util.EnumSet< LogOutputFlags > com.datalogics.PDFL.LogParams.getLogOutputFlags()
```

**Returns:** `java.util.EnumSet< LogOutputFlags >`

currently used flags.

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.

### setLogFileName

```java
void com.datalogics.PDFL.LogParams.setLogFileName(String logFileName)
```

**Parameters**

- `logFileName` (`String`): Path to the file to write the log to.

**Returns:** `void`

Sets file name to write the log to. NOTE: Ignored if LogOuputFlag.File flag is not set.

### setLogFormat

```java
void com.datalogics.PDFL.LogParams.setLogFormat(String logFormat)
```

**Parameters**

- `logFormat` (`String`): string Log record format.

**Returns:** `void`

Sets 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. Currently 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.

### setLogOutputFlags

```java
void com.datalogics.PDFL.LogParams.setLogOutputFlags(java.util.EnumSet< LogOutputFlags > logOutputFlags)
```

**Parameters**

- `logOutputFlags` (`java.util.EnumSet< LogOutputFlags >`): the flags containing outputs to write the log to.

**Returns:** `void`

Sets LogOutputFlags.Allows to specify where to put DLE's log. 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.
