You are here

function spam_log in Spam 5.3

Same name and namespace in other branches
  1. 5 spam.module \spam_log()
  2. 6 spam.module \spam_log()

Write to the spam_log database table.

23 calls to spam_log()
bayesian_spamapi in filters/bayesian/bayesian.module
Spam API Hook
bayesian_spam_filter in filters/bayesian/bayesian.module
Determine whether or not the content is spam.
bayesian_tokens_update in filters/bayesian/bayesian.module
Update token probabilities in database.
custom_spam_filter in filters/custom/custom.module
Apply enabled custom filter rules against content.
duplicate_init in filters/duplicate/duplicate.module
If IP blacklisting and IP blocking are both enabled, perform a database query on each page load to see if the current visitor has been blacklisted.

... See full list

3 string references to 'spam_log'
spam_uninstall in ./spam.install
Completely uninstall the spam module.
spam_update_5300 in ./spam.install
Upgrade websites that were running old Spam 2.0 modules.
spam_update_5301 in ./spam.install
Add trid field to spam_log table.

File

./spam.module, line 1766

Code

function spam_log($level, $function, $message, $type = NULL, $id = NULL) {
  global $user;
  $trid = _spam_log_trace($message, $type, $id);
  if (variable_get('spam_log_level', SPAM_LOG) >= $level) {
    db_query("INSERT INTO {spam_log} (level, trid, content_type, content_id, uid, function, message, hostname, timestamp) VALUES(%d, %d, '%s', %d, %d, '%s', '%s', '%s', %d)", $level, $trid, $type, $id, $user->uid, $function, $message, $_SERVER['REMOTE_ADDR'], time());
  }
}