diff options
| author | 2015-01-29 10:14:45 +0100 | |
|---|---|---|
| committer | 2015-01-29 10:14:45 +0100 | |
| commit | 59ea9f2a3b131432236745483e20cb50338110df (patch) | |
| tree | 68f2de9dca29c33cad40cc60f0d8fcf812579404 /app/actualize_script.php | |
| parent | b355a45c35b366fe2ad56b461dd28b11956ef6d9 (diff) | |
Remove calls to syslog()
Temporary fix:
- Change syslog by Minz_Log::notice in most of the files
- Logs are stored in USERS_PATH/_/log.txt for actualize_script.php
- Simply comment syslog in SimplePie
See https://github.com/FreshRSS/FreshRSS/issues/711
Diffstat (limited to 'app/actualize_script.php')
| -rwxr-xr-x | app/actualize_script.php | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/app/actualize_script.php b/app/actualize_script.php index bae40aa56..fc4f9bfbb 100755 --- a/app/actualize_script.php +++ b/app/actualize_script.php @@ -21,6 +21,9 @@ $_GET['force'] = true; $_SERVER['HTTP_HOST'] = ''; +$log_file = join_path(USERS_PATH, '_', 'log.txt'); + + $app = new FreshRSS(); $system_conf = Minz_Configuration::get('system'); @@ -41,13 +44,13 @@ $min_last_activity = time() - $limits['max_inactivity']; foreach ($users as $user) { if (($user !== $system_conf->default_user) && (FreshRSS_UserDAO::mtime($user) < $min_last_activity)) { - syslog(LOG_INFO, 'FreshRSS skip inactive user ' . $user); + Minz_Log::notice('FreshRSS skip inactive user ' . $user, $log_file); if (defined('STDOUT')) { fwrite(STDOUT, 'FreshRSS skip inactive user ' . $user . "\n"); //Unbuffered } continue; } - syslog(LOG_INFO, 'FreshRSS actualize ' . $user); + Minz_Log::notice('FreshRSS actualize ' . $user, $log_file); if (defined('STDOUT')) { fwrite(STDOUT, 'Actualize ' . $user . "...\n"); //Unbuffered } @@ -62,7 +65,8 @@ foreach ($users as $user) { if (!invalidateHttpCache()) { - syslog(LOG_NOTICE, 'FreshRSS write access problem in ' . join_path(USERS_PATH, $user, 'log.txt')); + Minz_Log::notice('FreshRSS write access problem in ' . join_path(USERS_PATH, $user, 'log.txt'), + $log_file); if (defined('STDERR')) { fwrite(STDERR, 'Write access problem in ' . join_path(USERS_PATH, $user, 'log.txt') . "\n"); } @@ -70,7 +74,7 @@ foreach ($users as $user) { } -syslog(LOG_INFO, 'FreshRSS actualize done.'); +Minz_Log::notice('FreshRSS actualize done.', $log_file); if (defined('STDOUT')) { fwrite(STDOUT, 'Done.' . "\n"); $end_date = date_create('now'); |
