Answer the question
In order to leave comments, you need to log in
How to properly organize logging in a monolithic web application?
Hello.
I have a medium-sized monolithic application written in symfony (~150 services), monolog is used for logging.
Almost every service has operations logging (the logger is injected as a dependency) and there was a problem with filtering messages by sender.
Let's say two services have code like this:
// AService
$this->logger->info("Message sent to {user}", ['user' => $user]);
// BService
$this->logger->info("Message sent to {user}", ['user' => $user]);
// AService
$this->logger->info("{service} some message", ['service' => __CLASS__]);
$this->logger->info("{service} another message", ['service' => __CLASS__]);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question