I ran into an issue today where I was surprised (understatement) to
see some tables did not show up in my log file. It turns out the
little check box "Include in Log File" on the table definitions was
unchecked. (24 tables out of 229)
For those of you who use custom primary keys, it's an easy mistake to
make. Now-a-days when you create a new table in 4D, 4D automatically
assigns a primary key and turns on logging. The problem is, to change
the primary key format, you need to first drop the existing key which
turns the logging off. Just because you re-add your custom primary
key, the logging is not automatically turned back on - you have to
manually check the box - easy to forget.
When you have 200+ tables in your structure, clicking on each table to
find out where you forgot to turn logging back on is not practical.
Below is code based on an earlier post on the NUG from a thread
between Cannon and Arnaud (thanks to both of you for that). Running it
simply gives you an alert with all the tables that have Journaling
(logging) turned off.
ARRAY BOOLEAN($logged_ab;0) //>>>this one
SELECT LOGGED, TABLE_NAME, TABLE_ID
INTO :$logged_ab, :$name_at, :$table_al;
$Size_vl:=Size of array($name_at)