Code Monkey home page Code Monkey logo

Comments (11)

DavidHavl avatar DavidHavl commented on August 23, 2024

Hi,
this is because it is a Fatal Error. Fatal errors do not have traces (unless you use xdebug). The current version of the module leaves trace field empty for fatal errors (not to confuse things). Maybe It should say something like "FATAL ERROR, no trace"?

from dherrorlogging.

teseo avatar teseo commented on August 23, 2024

Hi David,

If we are talking more on a user interface level, you know some errors are not displayed but they can be logged. Maybe having that no trace messages plus mentioning that check the error_log in case you have setup error_logging would be great.

We have an old error log system that we want to replace with your module and at the moment we can't replace it as some errors are not logged with your module and it is properly logged in our old error logger.

When I have more information, I can open a new ticket and provide more insights.

We're going to make a great module all together.

from dherrorlogging.

DavidHavl avatar DavidHavl commented on August 23, 2024

Did you try to lower the error type threshold?
There is a setting (in dherrorlogging.global.php)
'priority' => Logger::WARN
If you set it to Logger::NOTICE or Logger::INFO or Logger::DEBUG it should log the other types as well.

If this is not going to solve it for you send me more info and we can enhance the module.

from dherrorlogging.

teseo avatar teseo commented on August 23, 2024

Yes, sure. I have it set to

    /**
     * Priority to start logging from.
     */
    'priority' => Logger::INFO,

I believe it has some todo with this way to attach:

        $sharedEventManager->attach('Zend\Mvc\Application', array(MvcEvent::EVENT_DISPATCH_ERROR, MvcEvent::EVENT_RENDER_ERROR), function($event) use ($logger, $generator) {

Instead of having an array of MCEvent errors, we have two lines and attach them individually. But again, I haven't had time to research on that so It could be the reason or could be something else.

If I find more info, I'll come back to you.

from dherrorlogging.

teseo avatar teseo commented on August 23, 2024

Are you logging syntax errors? our old log used to and it seems that your module does not do it to me.

from dherrorlogging.

DavidHavl avatar DavidHavl commented on August 23, 2024

Not really, this module is meant for production environments where syntax errors should already be taken care of by development tools.

from dherrorlogging.

teseo avatar teseo commented on August 23, 2024

I understand your point.

We need to log the syntax errors as we are not going to make a difference in logging other than the rate limit (solved by writing my custom DB Writter).

What's your recommendation to log everything with your module?

Many thanks!

from dherrorlogging.

kukoman avatar kukoman commented on August 23, 2024

would be nice to have parse/syntax error as well

from dherrorlogging.

DavidHavl avatar DavidHavl commented on August 23, 2024

@teseo
I have released new version and updated the code to catch parse/syntax errors as well.
Unfortunately it is not able to get the trace (just as for other fatal errors). It would have to be done quite intrusively.
There would need to be dynamically rewritten "error_log" to point to certain file and then shutdown function would read from that file. But doing that may not be acceptable by all users so I have not done that. Hope it helps.

Please note if you are using the provided db log writer there is now new config for table name and mapping the table fields.

from dherrorlogging.

teseo avatar teseo commented on August 23, 2024

Just updated and made some tests.

We have extended your db log writer with user id and some other fields and it seems to capture properly syntax errors with no need to change any config entry or anything.
Thank you very much for your work and anything I find I'll let you know.

from dherrorlogging.

DavidHavl avatar DavidHavl commented on August 23, 2024

Awesome.

from dherrorlogging.

Related Issues (20)

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.