summaryrefslogtreecommitdiff
path: root/external/public-domain/sqlite/man/sqlite3_log.3
blob: 9face15f7711e4693c433cb0a81bf1862534ce7d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
.Dd December 19, 2018
.Dt SQLITE3_LOG 3
.Os
.Sh NAME
.Nm sqlite3_log
.Nd Error Logging Interface
.Sh SYNOPSIS
.Ft void 
.Fo sqlite3_log
.Fa "int iErrCode"
.Fa "const char *zFormat"
.Fa "..."
.Fc
.Sh DESCRIPTION
The sqlite3_log() interface writes a message into the
error log established by the SQLITE_CONFIG_LOG
option to sqlite3_config().
If logging is enabled, the zFormat string and subsequent arguments
are used with sqlite3_snprintf() to generate the
final output string.
.Pp
The sqlite3_log() interface is intended for use by extensions such
as virtual tables, collating functions, and SQL functions.
While there is nothing to prevent an application from calling sqlite3_log(),
doing so is considered bad form.
.Pp
The zFormat string must not be NULL.
.Pp
To avoid deadlocks and other threading problems, the sqlite3_log()
routine will not use dynamically allocated memory.
The log message is stored in a fixed-length buffer on the stack.
If the log message is longer than a few hundred characters, it will
be truncated to the length of the buffer.
.Sh SEE ALSO
.Xr sqlite3_config 3 ,
.Xr sqlite3_log 3 ,
.Xr sqlite3_mprintf 3 ,
.Xr SQLITE_CONFIG_SINGLETHREAD 3