feat: maintenance tasks, logs
- add interval for periodic maintenance tasks - add cache prune periodic task - use rotating handler for monolog - update UI logs component - correctly reset cache from admin - increase cache timeout for tg data - fix UI errors in admin
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
use Bastion\ApplicationFactory;
|
||||
use Cart\User;
|
||||
use Monolog\Handler\StreamHandler;
|
||||
use Monolog\Handler\RotatingFileHandler;
|
||||
use Monolog\Logger;
|
||||
use Openguru\OpenCartFramework\Application;
|
||||
use Openguru\OpenCartFramework\Http\Response as HttpResponse;
|
||||
@@ -252,7 +252,7 @@ class ControllerExtensionModuleTgshop extends Controller
|
||||
'language_id' => (int) $this->config->get('config_language_id'),
|
||||
],
|
||||
'logs' => [
|
||||
'path' => DIR_LOGS . '/telecart.log',
|
||||
'path' => DIR_LOGS,
|
||||
],
|
||||
'database' => [
|
||||
'host' => DB_HOSTNAME,
|
||||
@@ -298,10 +298,9 @@ class ControllerExtensionModuleTgshop extends Controller
|
||||
{
|
||||
$log = new Logger('TeleCart_Admin');
|
||||
$log->pushHandler(
|
||||
new StreamHandler(
|
||||
DIR_LOGS . '/telecart.log',
|
||||
$debug ? Logger::DEBUG : Logger::INFO,
|
||||
)
|
||||
new RotatingFileHandler(
|
||||
DIR_LOGS . '/telecart.log', 14, $debug ? Logger::DEBUG : Logger::INFO
|
||||
),
|
||||
);
|
||||
|
||||
return $log;
|
||||
|
||||
Reference in New Issue
Block a user