diff options
author | Andrew Dolgov <[email protected]> | 2018-11-30 08:34:29 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2018-11-30 08:34:29 +0300 |
commit | c10a43069ec1e71b6608574a81fb29c76919e132 (patch) | |
tree | 69b94003a2512b14e488b0553cf944e2bbdba2a8 /plugins/cache_starred_images | |
parent | 758752684c68efd179071cd77c92f78879e68f6d (diff) |
debug logging system rework:
* support various logging levels per-message
* remove hacks like debug_suppress, DAEMON_EXTENDED_DEBUG, etc
* _debug() is kept as a compatibility shim for plugins
Diffstat (limited to 'plugins/cache_starred_images')
-rwxr-xr-x | plugins/cache_starred_images/init.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/cache_starred_images/init.php b/plugins/cache_starred_images/init.php index ae0eaf56d..a1916e226 100755 --- a/plugins/cache_starred_images/init.php +++ b/plugins/cache_starred_images/init.php @@ -170,7 +170,7 @@ class Cache_Starred_Images extends Plugin implements IHandler { $status_filename = $this->cache_dir . $article_id . "-" . sha1($site_url) . ".status"; - //_debug("status: $status_filename"); return; + Debug::log("status: $status_filename", Debug::$LOG_EXTENDED); if (file_exists($status_filename)) $status = json_decode(file_get_contents($status_filename), true); @@ -181,7 +181,7 @@ class Cache_Starred_Images extends Plugin implements IHandler { // only allow several download attempts for article if ($status["attempt"] > $this->max_cache_attempts) { - _debug("too many attempts for $site_url"); + Debug::log("too many attempts for $site_url", Debug::$LOG_VERBOSE); return; } @@ -214,7 +214,7 @@ class Cache_Starred_Images extends Plugin implements IHandler { $local_filename = $this->cache_dir . $article_id . "-" . sha1($src) . $extension; - //_debug("cache_images: downloading: $src to $local_filename"); + Debug::log("cache_images: downloading: $src to $local_filename", Debug::$LOG_VERBOSE); if (!file_exists($local_filename)) { $file_content = fetch_file_contents(["url" => $src, "max_size" => MAX_CACHE_FILE_SIZE]); |