Skip to content

Instantly share code, notes, and snippets.

@convenient
Last active October 1, 2021 09:59
Show Gist options
  • Save convenient/543c9752384a1fe005dc4ab60c3732bd to your computer and use it in GitHub Desktop.
Save convenient/543c9752384a1fe005dc4ab60c3732bd to your computer and use it in GitHub Desktop.
Add stacktrace to all magento logs

vendor/magento/framework/Logger/Monolog.php

    public function addRecord($level, $message, array $context = [])
    {
        $context[uniqid('trace')] = (new \Exception())->getTraceAsString();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment