Can the Feeds_log perhaps work together with Drupal's syslog.module? I would like to disable the MySQL logging on a production site, optionally throw Exception into the syslog instead.
Can the Feeds_log perhaps work together with Drupal's syslog.module? I would like to disable the MySQL logging on a production site, optionally throw Exception into the syslog instead.
Comments
Comment #1
alan d. commentedYep this would be nice, we have 4,500 entries in ours, making dumps to the test sites slower than they should be. (table size is 35.7 MiB)
The attached patch allows developers to alter:
a) turn off feeds log completely
b) to restrict the age limit in the log
usage
Comment #2
alan d. commentedComment #3
deviantintegral commentedThe above patch looked good, but in our case we wanted to actually log errors to syslog on production. Here's an update that changes logging to:
Comment #4
deviantintegral commentedFixing comments from a previous approach I tried.
Comment #5
deviantintegral commentedPrefix our log messages with "feeds" for easier identification.
Comment #6
elliotttf commentedThis worked perfectly for me. Disabled dblog, enabled syslog -> feeds log gets routed there. +1 for this.
Comment #7
twistor commentedErr. We can't just check for dblog. It needs to be a separate variable, I guess. I don't see the use case for disabling it entirely, however.
Comment #8
aleksijohansson commentedExactly what I needed. Feeds was filling the syslog and that made finding real issues very hard. Disabling feeds log with the variable works like a charm!
Comment #9
honza pobořil commented@twistor What you recommend to do? Switch in Feeds settings (Log to feeds_log table / Log to Watchdog)?
Comment #10
megachrizMaybe we could use a bitwise operator to control the log behavior. This way you could set a variable with which you can set to use the feeds_log table, watchdog or both. The attached patch implements this.
Usage:
variable_set('feeds_log_methods', FEEDS_LOG_DB);variable_set('feeds_log_methods', FEEDS_LOG_WATCHDOG);variable_set('feeds_log_methods', FEEDS_LOG_DB | FEEDS_LOG_WATCHDOG);variable_set('feeds_log_methods', '');In the patch I've copied some code from the
watchdog()function to avoid writing to dblog, as I think it isn't useful to write the message to both feeds_log and dblog and I figured that if you don't want to write to the feeds_log table, why would you want to write to dblog? So that's why I think writing to dblog should be skipped altogether. This is debatable, however.Could use some automated tests, if this is an approved method to fix the issue.
Comment #11
bluegeek9 commentedUnfortunately, Drupal 7 is End of Life and no longer supported. We strongly encourage you to upgrade to a supported version of Drupal.