Gossamer Forum
Home : Products : DBMan SQL : Discussion :

log files

Quote Reply
log files
I see mention in the code of logging. Where are the log files please?! Anything I need to do to turn logging on?
Tim Ault
Oxford UK
Quote Reply
Re: [timbo] log files In reply to
In your DBManSQL Admin, select the table name and setup from the dropdown menu.

If you write a table name in the Log table field, it will auto create a table that logs the following -

Time

Action

User

IP

Table Name



You can have a seperate log table for each of your tables or you can share the same one for all your tables.

That's all you need to do.

Simon.
Quote Reply
Re: [jai] log files In reply to
I've set up a log table.
The table has been created in the mysql database.
I've just added a record, and there's nothing in the log table.

I must be missing something obvious. Can anyone help please?
Tim Ault
Oxford UK
Quote Reply
Re: [timbo] log files In reply to
Double check the 'Log table' property at Admin- Tables- Setup. Make sure it is set.

TheStone.

B.
Quote Reply
Re: [TheStone] log files In reply to
Actually logging is working for deletes, but not for adds.

I'm wondering if something is missing from the add_multi_records subroutine.

The add_record subroutine has a call to auth_logging, but add_multi_records doesn't. Could this be the problem?
Quote Reply
Re: [timbo] log files In reply to
You're right! Here is the fixed code for add_multi_records subroutine:

...
my $ret = $self->{db}->add($hash);
if ( defined ($ret) ) {
$self->auth_logging('add record ') if ( $self->{cfg}->{log_file} );
$rec_added++;
}
....

TheStone.

B.