Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2026-01-12 14:24:57

Adams
Plugin Author
Registered: 2024-08-30
Posts: 59

SQL statements logging

I like to log all executed sql statements, for example when I save article.
Is there option to do logging for all statements to a console ?
the debug option shows all files with line numbers only.

Thanks

Last edited by Adams (2026-01-12 14:35:31)

Offline

#2 2026-01-12 14:46:38

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,379
Website GitHub

Re: SQL statements logging

You can add this to your config.php:

define('TXP_DEBUG', 1);

And that will spit out all queries to the trace log (view source). You can also set the Admin>Preferences Production status to ‘debugging’ to do the same thing.

If you want all the debug info to go to a file, add this to config.php:

define('txpdmpfile', '/path/to/some_file.txt');

The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#3 2026-01-12 14:52:50

Adams
Plugin Author
Registered: 2024-08-30
Posts: 59

Re: SQL statements logging

Thank you sir, that worked.

Offline

Board footer

Powered by FluxBB