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