Improved logging, richer stack traces - 7.14 #10342
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description, Motivation and Context
Adds some
config_override.php
options to get more information in the logs, specifically:Documentation preview
https://pedro--suitedocs.netlify.app/developer/logging/#_advanced_logging_configuration
How To Test This
Please read the documentation linked above, there are many options.
An important part of the testing is confirming that nothing changes until we start putting options in
config_override.php
. This will make me more confident about putting the code out there :-)For a simple run, you can test this by adding entries in your
config_override.php
such as these (all explained in the Docs page):Answers to some valid concerns
This is backwards compatible because it does not assume any config values to be there, always uses sensible defaults, and respects the previous meaning of
$sugar_config['show_log_trace']
.This code is complex, and some bug can have slipped by, but it only runs in the cases where you select log traces, so it's easy to turn off, and shouldn't affect production systems.
Some of this code impacts performance (lots of string operations, more file activity) but it's always opt-in: the impact only occurs when you configure it to happen.
This is accompanied with a warning in Documentation: using log traces with argument values might leave sensitive information in the system logs. Use it only temporarily for troubleshooting purposes; obfuscate the information before posting it online; double-check that your logs are only accessible to admins; delete the logs when finished troubleshooting.
Types of changes
Final checklist