Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7884269
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T04:45:14+00:00 2026-06-03T04:45:14+00:00

I may just be having trouble with the error-handling documentation, but what I have

  • 0

I may just be having trouble with the error-handling documentation, but what I have in mind is a few different scenarios:

  1. When PHP throws a typical error, I want to keep the default error logging i place but also have separate error logs based on the error type / severity (a log for only fatal errors so I don’t have to scan past millions of minor errors, but still have those minor errors logged in the general pile).

  2. For a webapp / platform (like WordPress or MediaWiki, etc), have PHP errors (all, not just those thrown by webapp) stored in the web app error log. (This will almost certainly be severity based. The idea is to go to the webapp error log and being able to see PHP fatal errors mixed in to avoid hunting down that domain’s error log, etc)

  3. Also having errors of certain types thrown by the webapp go to the general error log and it’s own custom log (I know I’ve seen one or the other, but not both).

So the root question is: How can I have a custom error log without losing/overriding the default error log?

Also, is it pretty safe to assume that in most cases errors and exceptions at this level are interchangeable, or will I need to take other steps for similar exception handling goals?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T04:45:15+00:00Added an answer on June 3, 2026 at 4:45 am

    You can set your own error handler and still let php handle the triggered error as usual

    http://se.php.net/manual/en/function.set-error-handler.php

    set_error_handler(function($errno, $errstr, $errfile, $errline) {
      // do what you want  
      return false; // returning false makes PHP execute its own error handler as well
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have just started learning MySQL and am having trouble extracting matching flights from
I may just be doing something wrong but all of my javascript files as
I'm trying to implement the Send button , but running into what may just
This may be a stupid question but im just starting to learn Rail thats
This may be a really dumb question but I'm just starting to learn the
This may sound like a stupid question but I'm a beginner not just to
May be its a simple question but it's really driving me crazy. I just
I have been having trouble getting this plugin to attach correctly to ajax loaded
I have 4GB of RAM, and am having trouble pulling 147.6MB into memory in
I'm having trouble finding anything on the subject. Let's say I have a list

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.