Hot answers tagged

6

I was able to create a script to revert in bulk. I needed to look up the log_conn_id value associated with the bulk change I made. I made the change using the API import, but any change that happens in a single connection can be reverted. Simply change the value of $log_conn_id in the script below, and change $tablesToRevert to include the table(s) that ...


3

It depends on what you are trying to do. If you want the complete removal of the contact, together with related entities (like address, activities, event participations etc.), then permanently deleting the contact will delete all the associated entities. If you just want to remove the change log for that 1 contact without deleting the contact, you can run a ...


2

I can think of a way to do it the other way around, by defining your own civicrm logger and having it send to syslog. The problem is large stacktraces might get cut off and be formatted badly because of the way that works. To get php to send all its errors including 500-level errors to civi might not even be possible, because they happen before civi even ...


1

You're correct that logging is at the database level. It seems like a bit of a loophole that it can be enabled-disabled on a per-domain basis. I would set it to TRUE on all domains to avoid unexpected behavior, but my guess is you'll only have a problem if you disable it on one site and expect it to continue working on others.


1

There is an extension which will record exports using civicrm export from contact search. Unless you have this extension installed there really isn't a way to see if there were specific exports of information. More information on the extension can be found here


1

It's in civicrm_setting but if it's never been turned on it won't be there. But also it's more than just a setting - you would need to rebuild the schema and triggers. If you have cv installed you can do cv ev "Civi::settings()->set('logging', 1); $s = new CRM_Logging_Schema(); $s->enableLogging();" to do it from the command line manually.


1

Under Administer - CiviReport - Create Report From Template there is one called "Database Log Report". That shows you more or less what's in civicrm_log. For advanced logging (at Administer - System Settings - Misc - Logging), which I don't think is what you're talking about but just in case, the lack of an activity report is a known issue. The ...


1

If you can't correlate the events in order, are you logging from different machines? Event correlation is a rabbit hole and there are a lot of great products (free and not free to do it) however, you should start by looking at your logging environment (which it sounds like you are). If you are using stock syslog, I recommend moving to syslog-ng. NG was ...


Only top voted, non community-wiki answers of a minimum length are eligible