# Out-of-Process Logging

Logging is available for out-of-process filtering. The `kvoop` server can now create a log file that captures information on the files being processed, storing one entry per process. The generated log file is called `xxxx_kvoop.log`, where `xxxx` is a unique number identifying the process.

In the rare case when the `kvoop` server fails, you can use the log files to determine which file caused the failure. After processing is complete and the system shuts down, the logs are automatically deleted. To keep the log files after processing is successfully completed, see Keep Log Files.

NOTE: Out-of-process logging is not supported on AIX.

## Enable Out-of-Process Logging

To enable out-of-process logging, set the `KVOOP_LOGS_DIR` environment variable to the directory in which you want the log files to be stored. By default, logging is not enabled.

On UNIX, set the variable as follows:

    setenv KVOOP_LOGS_DIR /tmp

On Windows, set the variable as follows:

    set KVOOP_LOGS_DIR=c:\tmp

The following log file is created in the directory:

`process_id_kvoop.log`

where `process_id` is a numeric value that represents the logged process. New messages are appended to the file, and truncation is disabled by default.

If KeyView terminates unexpectedly and Windows minidump is enabled, a `process_id_crash_info.txt` file is generated (see Enable Windows Minidump). If logging was not enabled at the time of termination, this file contains instructions on how to enable logging.

## Set the Verbosity Level

You can control how much information is written to the file by setting the `KVOOP_LOG_VERBOSITY` environment variable.

Set the variable to one of the following options:

`1` | Include only error messages.
`2` | Include errors and warnings.
`3` | Include errors, warnings, and general information. This is the default.
`4` | Include all possible information. This setting is useful for debugging purposes.

## Enable Windows Minidump

KeyView can use the Windows minidump feature to provide additional logging information, which can be useful for debugging purposes.

The Windows minidump is disabled by default. To enable the Windows minidump, set `KVOOP_DUMP_ENABLE` to `1`. If an unexpected termination occurs after the minidump is enabled, three files are generated:

- `process_id_crash_info.txt`. This file contains `KVOOP` state and runtime information at the time of termination. If logging was not enabled at the time of termination, this file contains instructions on how to enable logging.
- `process_id_process_list.txt`. This file contains information from the DLLs that were loaded at the time of the termination.
- `process_id_report.dmp`. The Windows dump file, which contains further information about the termination. You can open it with either a Windows debugger or `autnhelper.exe` (you must copy this file to the same directory).

You can control the amount of information presented in the Windows dump file by creating the following files in the directory:

    dumper.NORMAL
    dumper.WITHDATASEGS
    dumper.WITHFULLMEMORY
    dumper.WITHHANDLEDATA

## Keep Log Files

After processing is complete and the system is shut down, the log files are automatically deleted from the directory. To keep the log files after a successful run, set the `KVOOP_KEEP_LOGS` environment variable.

On UNIX, set the variable as follows:

    setenv KVOOP_KEEP_LOGS 1

On Windows, set the variable as follows:

    set KVOOP_KEEP_LOGS=1

_FT_HTML5_bannerTitle.htm