---
name: "TPMLIB_SetDebugFD"
section: "3"
platform: "linux"
package: "libtpms"
version: "0.10.2-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/TPMLIB_SetDebugFD"
---

# TPMLIB\_SetDebugFD(3)

Set the file descriptor to send the debug output to TPMLIB\_SetDebugLevel - Set the debugging level TPMLIB\_SetDebugPrefix - Set the prefix for each debugging line

## NAME

TPMLIB\_SetDebugFD     - Set the file descriptor to send the debug output to

TPMLIB\_SetDebugLevel  - Set the debugging level

TPMLIB\_SetDebugPrefix - Set the prefix for each debugging line

## LIBRARY

TPM library (libtpms, -ltpms)

## SYNOPSIS

**#include \<libtpms/tpm\_library.h**\>

**uint32\_t TPMLIB\_SetDebugFD(int fd);**

**uint32\_t TPMLIB\_SetDebugLevel(unsigned int level);**

**uint32\_t TPMLIB\_SetDebugPrefix(const char \*prefix);**

## DESCRIPTION

**TPMLIB\_SetDebugFD()** allows to set the file descriptor to send the debug output to.

**TPMLIB\_SetDebugLevel()** allows to set the debug level. Only debug levels greater than 1 will produce output. The indentation level of a line will determine whether it is printed. Lines with 0 indentation will be printed at debug level 1, 1 space of indentation at debug level 2 and so on.

**TPMLIB\_SetDebugPrefix()** allows to set a prefix that is to be printed in front of every line of debugging output. The prefix can be used for further indentation.
