1

I am trying to figure out how to php stack trace errors (PDOEXception errors) but get the message to log into a database instead of to a log file.

How can I best accomplish this?

  • 1
    This seems to be a duplicate of your other [closed question](https://stackoverflow.com/questions/61226495/logging-application-errors-to-database-table).Please avoid posting duplicates, instead, try to make your question more clear and focused so we can help better. – Nima Apr 16 '20 at 08:25
  • @YourCommonSense really anything that throws an exception. I liked to see any errors users are running into so we can fix them them . We done thorough testing but you never know. I know their are services out there that does this but id like to start with our database first. –  Apr 16 '20 at 08:26
  • Do you understand that PDOEXception is a **database** error? – Your Common Sense Apr 16 '20 at 08:30
  • @YourCommonSense Yes, of course. The application that I am working on has a backend on php and react/redux frontend. I am jumping on this project and have no idea what to expect. So yes, I am trying to log pdo exceptions. Just because is PDOEXception is a database error doesnt mean that the database is not working. –  Apr 16 '20 at 08:39
  • You never can tell. what if it's a not working database causes the error? Going to put your app in the infinity loop? For real? And what's wrong with logging in files? Did you try that? What went wrong? – Your Common Sense Apr 16 '20 at 08:50
  • @YourCommonSense logfiles work just fine. I did bring up those concerns but, I been given a directive to log them into a database. I've always logged them in logfiles and never really been asked to log them in a database so I am unsure how to do that. –  Apr 16 '20 at 08:55
  • What kind of errors does it log? Having a lot of PDOExceptions means something really terrible. Is it syntax errors due to neglect of prepared statements or something like primary key duplications? – Your Common Sense Apr 16 '20 at 09:02
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/211792/discussion-between-jesus2kus-and-your-common-sense). –  Apr 16 '20 at 09:04

0 Answers0