---
name: "DL"
section: "3"
platform: "linux"
package: "nana"
version: "2.5-12+deb7u1"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/DL"
---

# DL(3)

generate logging messages in C and C++ using a debugger

## NAME

DL - generate logging messages in C and C++ using a debugger

## SYNOPSIS

\#include \<DL.h\>

DL(format,...)

DLG(guard,format,...)

DLH(handler,format,...)

DLP(param,format,...)

DLGH(guard,handler,format,...)

DLHP(handler,param,format,...)

DLGHP(guard,handler,param,format,...)

## DESCRIPTION

The DL macro is used to print logging or debugging messages using a debugger. The [nana(1)](/nana/1.md) command generates a set of debugger commands which are then sourced into [gdb(1)](/gdb/1.md) to implement the logging. If you don't run the executable under [gdb(1)](/gdb/1.md) then no tracing will occur.  The arguments are:

format,... - a [printf(3)](/printf/3.md) style argument list containing the message

guard - print only if the guard is true.

handler - the code that does the printing. Default: fprintf

param - a parameter to be passed off to the handler. Default: stdout

See nana.info for details on configuring the behaviour.

## SEE ALSO

[nana-clg(1)](/nana-clg/1.md), [nana(1)](/nana/1.md), [nana(3)](/nana/3.md), [I(3)](/I/3.md), [DI(3)](/DI/3.md), [L(3)](/L/3.md), [DL(3)](/DL/3.md), [Q(3)](/Q/3.md) and nana.info.

The nana.info file is the primary documentation for this library.

## AUTHOR

Phil Maker \<pjm@gnu.org\>
