Skip to content
Snippets Groups Projects
Verified Commit b61200e5 authored by Bartek Jaskulski's avatar Bartek Jaskulski
Browse files

feat: include consistent uid across one request


For better discoverability of singular request, include uid in log
context. This way it should become trivial to inspect actions, even on
high-concurrency websites.

Signed-off-by: default avatarBart Jaskulski <bjaskulski@protonmail.com>
parent c1be647d
No related branches found
No related tags found
1 merge request!29feat/message handling
......@@ -8,6 +8,7 @@ use Monolog\Handler\NullHandler;
use Monolog\Logger;
use Monolog\Handler\ErrorLogHandler;
use Monolog\Processor\PsrLogMessageProcessor;
use Monolog\Processor\UidProcessor;
use WPDesk\Logger\WC\WooCommerceHandler;
final class SimpleLoggerFactory implements LoggerFactory {
......@@ -34,7 +35,7 @@ final class SimpleLoggerFactory implements LoggerFactory {
$this->logger = new Logger(
$this->channel,
[],
[ new PsrLogMessageProcessor( null, true ) ]
[ new PsrLogMessageProcessor( null, true ), new UidProcessor() ]
);
if ( $this->options->use_wc_log ) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment