Giter Site home page Giter Site logo

controlerrorlog's People

Contributors

jako avatar kudashevs avatar sergant210 avatar vierkantemeter avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

controlerrorlog's Issues

Feature Suggestion: Show addon only to admins

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
}

Error Log path setting

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);

Testing in MODX3

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

Visual bug:
image

Action buttons not working
image

MODX Revolution 3.0.0-alpha3 (git) 05-03-2021, PHP Version 7.4.12

Копия файла лого - описание и выбор логов.

Я очень активно использую функционал копию лога. Для того что бы вернуться к ошибкам позже.

При этом очень не хватает возможности сделать подпись к файлу. Приходится копировать название файла и уже в ежедневнике, в CRM или в To-do листе - описывать какую-то проблему. Хочется: нажать кнопку, подписать проблему и сохранить. В супербоксе с названием (цифра 1 на скриншоте) вывести данную подпись, и будет удобно, как минимум для системных людей.

изображение

А еще для меня удобно фокусировать на каких-то конкретных ошибках. Поэтому еще одно предложение реализовать возможность выбора ошибок из лога для сохранения в отдельный файл.

изображение

Not clear what button 'Error log' does

Hi,

It's not clear what the button 'Error log' does. It will bring me to the error log, but I'm also already viewing it. Maybe you can change the name to something like 'View error log on own page' (English is not my mother tongue, but you will get the idea.)

voila_capture 2015-07-30_05-24-58_pm

dirname() expects exactly 1 parameter, 2 given

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.

Caching issues

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.

Plugin loses lexicon strings with some CMPs

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().

Stray smarty cache files

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

Problem with merging menu items

screenshot-resto-food ru-2018 11 29-14-29-44

Мне кажется, что добавив margin-left: 15px ссылке было бы логичнее ну или Илье добавить внутренние отступы

После установки пакета упала админка

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.

Question about controlerrorlog notifications

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.

Error & white screen

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

Manager blank screen (PHP Fatal error Allowed memory size of xx bytes exhausted)

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

controllErrorLog not showing up

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.