function feeds_dbg in Feeds 7
Same name and namespace in other branches
- 8.2 feeds.module \feeds_dbg()
- 6 feeds.module \feeds_dbg()
- 7.2 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 690 - 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);
}
}