Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strip unnecessary details in error logs #4483

Open
dvz opened this issue Oct 30, 2021 · 0 comments
Open

Strip unnecessary details in error logs #4483

dvz opened this issue Oct 30, 2021 · 0 comments
Labels
b:1.8 Branch: 1.8.x s:confirmed Status: Confirmed. Retested and found the issue exists t:enhancement Type: Enhancement. Contains minor improvements t:regression Type: Regression. Degraded functionality after update

Comments

@dvz
Copy link
Member

dvz commented Oct 30, 2021

The error logs may contain entries unrelated to problem origins.

  • The function added via Add separate callback function for set_error_handler() #4440 results in an additional call (internal to the error handler) logged as:

    #0  errorHandler->error() called at [/inc/class_error.php:153]
    

    The $strip argument in calls to errorHandler:generate_backtrace() within the class should be adjusted so that the first entry references the path and line number of a point of interest:

    #0  errorHandler->error_callback() called at [origin of the problem]
    
  • The errorHandler::email_error() method calls the debug_print_backtrace() function directly, which may include unnecessary entries, and additionally include arguments values due to a missing DEBUG_BACKTRACE_IGNORE_ARGS flag.

    cf.

    $trace = debug_backtrace(1<<1 /* DEBUG_BACKTRACE_IGNORE_ARGS */);

@dvz dvz added t:enhancement Type: Enhancement. Contains minor improvements s:confirmed Status: Confirmed. Retested and found the issue exists b:1.8 Branch: 1.8.x t:regression Type: Regression. Degraded functionality after update labels Oct 30, 2021
@dvz dvz added this to the 1.8.30 milestone Oct 30, 2021
@dvz dvz removed this from the 1.8.31 milestone Jul 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
b:1.8 Branch: 1.8.x s:confirmed Status: Confirmed. Retested and found the issue exists t:enhancement Type: Enhancement. Contains minor improvements t:regression Type: Regression. Degraded functionality after update
Projects
None yet
Development

No branches or pull requests

1 participant