function feeds_dbg in Feeds 6
Same name and namespace in other branches
- 8.2 feeds.module \feeds_dbg()
- 7.2 feeds.module \feeds_dbg()
- 7 feeds.module \feeds_dbg()
Logs to a file like /mytmp/feeds_my_domain_org.log in temporary directory.
Related topics
2 calls to feeds_dbg()
- FeedsHTTPFetcher::request in plugins/
FeedsHTTPFetcher.inc - Implements FeedsFetcher::request().
- PuSHEnvironment::log in plugins/
FeedsHTTPFetcher.inc - Implements PuSHSubscriberEnvironmentInterface::log().
File
- ./
feeds.module, line 675 - Feeds - basic API functions and hook implementations.
Code
function feeds_dbg($msg) {
if (variable_get('feeds_debug', FALSE)) {
if (!is_string($msg)) {
$msg = var_export($msg, TRUE);
}
$filename = trim(str_replace('/', '_', $_SERVER['HTTP_HOST'] . base_path()), '_');
$handle = fopen(file_directory_temp() . "/feeds_{$filename}.log", 'a');
fwrite($handle, date('c') . "\t{$msg}\n");
fclose($handle);
}
}