4

I use Monolog 1.10 as logging tool.

Along with the date and loglevel I need to persist class and method names from which logging method has been called. Seems that I need to configure formatter. But I could not find any examples for such case.

How do I do this?

Victor Mezrin
  • 2,797
  • 2
  • 32
  • 48

1 Answers1

6

Monolog has Introspection Processor. We need just add it to our logger or handler - and all needed information will be logged https://github.com/Seldaek/monolog/blob/master/src/Monolog/Processor/IntrospectionProcessor.php

Victor Mezrin
  • 2,797
  • 2
  • 32
  • 48