sergant210 / controlerrorlog Goto Github PK
View Code? Open in Web Editor NEWAdds the ability to control the MODX Revo error log and view it in a popup window.
License: MIT License
Adds the ability to control the MODX Revo error log and view it in a popup window.
License: MIT License
Hi there,
First of all; thanks for this great add-on! Works really well.
I have a small feature suggestion; option to show the add-on only to users who have admin privileges. Now, my customers (content editors) also see this, and I'm sure it will freak them out 😛 (although there are no critical errors in the log).
EDIT:
For now, I hard-coded the following in the controlErrorLog plug-in. But it would be nice to have this managed with an ACL or system setting.
if ($modx->user->isMember('Administrator')) {
// controlErrorLog code
}
I'm logging into another path. I use my own snippet to change the settings. It is included in the template header as recommended. The Modx error page remains empty, because the system looks into the default path and expects the default name. I want to change the path and name of the error log. I want to see the custom log in the report window.
Template:
<!DOCTYPE html>[[!own_snippets.error_handling]]
<html lang="de">
<head>
...
Snippet "own_snippets.error_handling":
<?php
$context = strtolower( $modx->context->key );
$user = $modx->getUser();
$user_name = $user->get( 'username' );
$error_log_filepath = 'path_to_folder/var/log/php/';
$error_log_filename = 'modx_' . $context . '_' . $user_name. '_error_log.log';
$modx->setDebug( E_ALL & ~E_NOTICE );
$modx->setLogLevel( modX::LOG_LEVEL_INFO );
$target = array(
'target' => 'FILE',
'options' => array(
'filepath' => $error_log_filepath,
'filename' => $error_log_filename ),
);
$modx->setLogTarget( $target );
$modx->log(xPDO::LOG_LEVEL_ERROR, 'Error Message', $target);
When installing, this is the log
Console
Console running...
Attempting to install package with signature: controlerrorlog-1.4.2-pl
Package found...now preparing to install.
Grabbing package workspace...
Workspace environment initiated, now installing package...
modx.modNamespace is deprecated since version 3.0. Replace references to class modx.modNamespace with MODX\Revolution\modNamespace to take advantage of PSR-4 autoloading.
modNamespace is deprecated since version 3.0. Replace references to class modNamespace with MODX\Revolution\modNamespace to take advantage of PSR-4 autoloading.
modNamespace is deprecated since version 3.0. Replace references to class modNamespace with MODX\Revolution\modNamespace to take advantage of PSR-4 autoloading.
modx.modSystemSetting is deprecated since version 3.0. Replace references to class modx.modSystemSetting with MODX\Revolution\modSystemSetting to take advantage of PSR-4 autoloading.
modSystemSetting is deprecated since version 3.0. Replace references to class modSystemSetting with MODX\Revolution\modSystemSetting to take advantage of PSR-4 autoloading.
modSystemSetting is deprecated since version 3.0. Replace references to class modSystemSetting with MODX\Revolution\modSystemSetting to take advantage of PSR-4 autoloading.
modx.modCategory is deprecated since version 3.0. Replace references to class modx.modCategory with MODX\Revolution\modCategory to take advantage of PSR-4 autoloading.
modCategory is deprecated since version 3.0. Replace references to class modCategory with MODX\Revolution\modCategory to take advantage of PSR-4 autoloading.
modCategory is deprecated since version 3.0. Replace references to class modCategory with MODX\Revolution\modCategory to take advantage of PSR-4 autoloading.
modChunk is deprecated since version 3.0. Replace references to class modChunk with MODX\Revolution\modChunk to take advantage of PSR-4 autoloading.
modChunk is deprecated since version 3.0. Replace references to class modChunk with MODX\Revolution\modChunk to take advantage of PSR-4 autoloading.
modChunk is deprecated since version 3.0. Replace references to class modChunk with MODX\Revolution\modChunk to take advantage of PSR-4 autoloading.
modPlugin is deprecated since version 3.0. Replace references to class modPlugin with MODX\Revolution\modPlugin to take advantage of PSR-4 autoloading.
modPlugin is deprecated since version 3.0. Replace references to class modPlugin with MODX\Revolution\modPlugin to take advantage of PSR-4 autoloading.
modPlugin is deprecated since version 3.0. Replace references to class modPlugin with MODX\Revolution\modPlugin to take advantage of PSR-4 autoloading.
modPluginEvent is deprecated since version 3.0. Replace references to class modPluginEvent with MODX\Revolution\modPluginEvent to take advantage of PSR-4 autoloading.
modPluginEvent is deprecated since version 3.0. Replace references to class modPluginEvent with MODX\Revolution\modPluginEvent to take advantage of PSR-4 autoloading.
modPluginEvent is deprecated since version 3.0. Replace references to class modPluginEvent with MODX\Revolution\modPluginEvent to take advantage of PSR-4 autoloading.
Successfully installed package controlerrorlog-1.4.2-pl
MODX Revolution 3.0.0-alpha3 (git) 05-03-2021, PHP Version 7.4.12
Я очень активно использую функционал копию лога. Для того что бы вернуться к ошибкам позже.
При этом очень не хватает возможности сделать подпись к файлу. Приходится копировать название файла и уже в ежедневнике, в CRM или в To-do листе - описывать какую-то проблему. Хочется: нажать кнопку, подписать проблему и сохранить. В супербоксе с названием (цифра 1 на скриншоте) вывести данную подпись, и будет удобно, как минимум для системных людей.
А еще для меня удобно фокусировать на каких-то конкретных ошибках. Поэтому еще одно предложение реализовать возможность выбора ошибок из лога для сохранения в отдельный файл.
After upgrading the extra it stopped working. The console says: controlErrorLog is not defined. Any help on this?
Seeing this error on 2 sites, both recently upgraded to MODX 2.8.0 and controlerrorLog to 1.4.0-beta.
[2020-10-12 00:20:04] (ERROR @ /home/site/core/components/controlerrorlog/processors/mgr/get.class.php : 131) PHP warning: dirname() expects exactly 1 parameter, 2 given
Once above error is cleared, ControlErrorLog is shows a notification but no error message content.
On a third site, I have both MODX 2.8.0 and controlErrorLog 1.4.0-beta, but do not see above issues.
it shows nothing
Maybe there occur caching issues with the new frontend mode of 1.4.0-beta.
I have currently faced FormIt &store=1 / FormItRetriever issues on a customer installation. The MODX error log was full of entries with 'Error caching script elements/modplugin/…'‚ 'Could not cache resource', 'Error caching script elements/modsnippet/…', 'Error caching lexicon topic‘ etc. After switching back to controlErrorLog 1.3.1 these errors don't occur anymore.
On my system, with some CMP extras all the lexicon strings are missing when the window comes up. It happens with Batcher, PackMan, and SiteCheck, but not Quip or Discuss.
It seems to only happen while the CMP is open. If you go to the dashboard or edit an object in the Manager, or log out and back in, it's back to normal.
I can't figure out why it's happening. I wonder if it might be because you're calling $modx->controller->addLexiconTopic('controlerrorlog:default'); instead of $modx->lexicon->load().
Проверил это на нескольких сайтах. Значок просто исчезает.
In my dev installation, two smarty cache files keep getting created with controlErrorLog:
connectors/templates_c/d4950c01bccb92e00cdc1a79bf982dcb935bad5f_0.file.error_table.tpl.php
manager/templates_c/134737f2061d5f48150095cc746cd70ab4600292_0.file.error_table.tpl.php
Normally the smarty cache is located in core/cache/mgr/smarty
.
ControlErrorLog 1.4.5
PHP Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /components/controlerrorlog/processors/mgr/get.class.php on line 139
у меня отличие от стандартной установки modx в том, что папка /manager/ была переименована при установке modx.
I`m little bit confused about system settings to CEL. I setup cronjob to it and Email is configured cron job too.
Now what system setting should be enabled or disabled so CEL will work. I have email set up too in CEL system settings.
It works when controlerrorlog.control_frontend is set to YES, but manual does not recommend that.
Now I have controlerrorlog.control_frontend set to NO. Should it work too by Cron jobs and should I keep email in system settings too?
Sorry that I can not produce any errors to my sites and they are very rare anyway to tell does my new settings work ;) But I want to know what are best and safest way to set up notifications.
Hi! I guess that after update something goes wrong.
2015/08/26 19:22:11 [error] 9099#0: *396068 FastCGI sent in stderr: "PHP message: PHP Fatal error: Can't use function return value in write context in /var/site/www/core/components/controlerrorlog/processors/mgr/errorlog/get.class.php on line 32" while reading response header from upstream, client: *, server: site.ru, request: "GET /manager/?a=workspaces HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-site.sock:", host: "site.ru", referrer: "http://site.ru/manager/?"
There's only white screen at the /manager
Possibly you set the "Up To" version at 2.x.x?
My error log grown to 60MB which causes the manager to show the white screen of death (500). The Apache error log says:
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 68499221 bytes) in /home/xxx/domains/xxx.nl/public_html/core/components/controlerrorlog/processors/mgr/errorlog/get.class.php on line 40, referer: http://www.xxx.nl/manager/?a=workspaces
When I disable controlErrorlog, everything is working back normal. I guess this add-on may need some modification so it will not break up the manager when the error log become so large. Raising the memory_limit doesn't sound like a solution.
MODX 2.5.0
controlerrorlog 1.1.2
First, thanks for a great plugin. I use it on all my sites.
I just upgraded an older site from 2.3 to 2.4 and then installed controllErrorLog, but it is not showing up on the menu bar. I am the main admin, sudo user. There are no errors in the log. I've not made any changes to the ACL. I've uninstalled it, manually cleared the cache and reinstalled. It's still not showing up.
Any suggestions?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.