diff options
| author | 2017-12-10 21:31:41 +0100 | |
|---|---|---|
| committer | 2017-12-10 21:58:24 +0100 | |
| commit | b1c317a253445a6458f1263c1b622a788cc7cd0e (patch) | |
| tree | d348ddbc62a98e53b50ca29cba352640b1aeb54d /app/actualize_script.php | |
| parent | 452886ea3ac4b91bc72952df659fb53ae7807c22 (diff) | |
Log rotation, use Minz_Log, new log constants
ADMIN_LOG, API_LOG, PSHB_LOG
Diffstat (limited to 'app/actualize_script.php')
| -rwxr-xr-x | app/actualize_script.php | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/app/actualize_script.php b/app/actualize_script.php index deaa1bf7c..d4908d3ea 100755 --- a/app/actualize_script.php +++ b/app/actualize_script.php @@ -20,10 +20,6 @@ $_GET['ajax'] = 1; $_GET['force'] = true; $_SERVER['HTTP_HOST'] = ''; - -$log_file = join_path(USERS_PATH, '_', 'log.txt'); - - $app = new FreshRSS(); $system_conf = Minz_Configuration::get('system'); @@ -45,13 +41,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)) { - Minz_Log::notice('FreshRSS skip inactive user ' . $user, $log_file); + Minz_Log::notice('FreshRSS skip inactive user ' . $user, ADMIN_LOG); if (defined('STDOUT')) { fwrite(STDOUT, 'FreshRSS skip inactive user ' . $user . "\n"); //Unbuffered } continue; } - Minz_Log::notice('FreshRSS actualize ' . $user, $log_file); + Minz_Log::notice('FreshRSS actualize ' . $user, ADMIN_LOG); if (defined('STDOUT')) { fwrite(STDOUT, 'Actualize ' . $user . "...\n"); //Unbuffered } @@ -66,8 +62,7 @@ foreach ($users as $user) { if (!invalidateHttpCache()) { - Minz_Log::notice('FreshRSS write access problem in ' . join_path(USERS_PATH, $user, 'log.txt'), - $log_file); + Minz_Log::warning('FreshRSS write access problem in ' . join_path(USERS_PATH, $user, 'log.txt'), ADMIN_LOG); if (defined('STDERR')) { fwrite(STDERR, 'Write access problem in ' . join_path(USERS_PATH, $user, 'log.txt') . "\n"); } @@ -75,7 +70,7 @@ foreach ($users as $user) { } -Minz_Log::notice('FreshRSS actualize done.', $log_file); +Minz_Log::notice('FreshRSS actualize done.', ADMIN_LOG); if (defined('STDOUT')) { fwrite(STDOUT, 'Done.' . "\n"); $end_date = date_create('now'); |
