function spam_log in Spam 6
Same name and namespace in other branches
- 5.3 spam.module \spam_log()
- 5 spam.module \spam_log()
Write to the spam_log database table.
24 calls to spam_log()
- spam_content_delete in ./
spam.module - This function is called when content on your website is deleted.
- spam_content_filter in ./
spam.module - API call to determine the likeliness that a given piece of content is spam, returning a rating from 1% likelihood to 99% likelihood. It is unlikely that you want to call this function directly.
- spam_content_insert in ./
spam.module - This function is called when new content is first posted to your website.
- spam_content_is_spam in ./
spam.module - API call to simply test if content is spam or not. No action is taken.
- spam_content_update in ./
spam.module - This function is called when content on your website is updated.
1 string reference to 'spam_log'
- spam_update_6001 in ./
spam.install - Allow for non-integer spam IDs
File
- ./
spam.module, line 1884 - Spam module, v3 Copyright(c) 2006-2008 Jeremy Andrews <jeremy@tag1consulting.com>. All rights reserved.
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', '%s', %d, '%s', '%s', '%s', %d)", $level, $trid, $type, $id, $user->uid, $function, $message, ip_address(), time());
}
}