# 22. Virtuoso Functions Guide - dbg_printf

Chapter Contents | Prev | Next
Keyword Search:
www.openlinksw.com
docs.openlinksw.com
Book Home
Contents
Preface
Virtuoso Functions Guide
Administration
Aggregate Functions
Array Manipulation
BPEL APIs
Backup
Compression
Cursor
Date & Time Manipulation
Debug
cov_load
cov_report
cov_store
dbg_obj_print
dbg_printf
explain
pldbg_stats
pldbg_stats_load
trace_off
trace_on
Dictionary Manipulation
Encoding & Decoding
File Manipulation
Free Text
Hashing / Cryptographic
LDAP
Locale
Mail
Miscellaneous
Number
Remote SQL Data Source
Replication
SOAP
SQL
String
Transaction
Type Mapping
UDDI
User Defined Types & The CLR
Virtuoso Java PL API
Virtuoso Server Extension Interface (VSEI)
Web Server & Internet
XML
XPATH & XQUERY
Functions Index

## dbg_printf

print formatted output onto the system console
dbg_printf (in format varchar, in arg1 any, ... , in argn any);
Parameters
format – a C sprintf -style format string
argn – The arguments to format and print in any type
Return Values

None

Description

dbg_printf prints a variable number (max. eight) of arguments to the system console of Virtuoso server, each argument formatted in C printf style, according to the format string specified in the first argument.

Examples
Simple example

The frammitz just zilched!

    if (frammitz_status 0)
      {
        dbg_printf ('Error: Frammitz status: %d.\nProgram terminated',
                    frammitz_status);
        signal ('42666', 'Frammitz zilched');
      }

Hitting these lines would cause something like this in a client:

    *** Error 42666: [Virtuoso Driver][Virtuoso Server]Frammitz zilched at line 84 (84) of Top-Level: zappi()

The console output would look like this:

    Error: Frammitz status: 2.
    Program terminated

See Also

sprintf