0

In monolog you can exclude path so that when an exception happens it doesn't get logged into prod.log

I wanted to exclude all logs from /items/* so I did the following:

monolog:
    handlers:
        main:
            type: fingers_crossed
            action_level: error
            handler: file
            channels: ["!doctrine", "!event", "!security", "!request"]
            excluded_404s:
                - ^/items/

I wanted to exclude errors from /items/19283712 and anything that has /items/WHATEVERCRAPINHERE . The documentation shown here details on how to do it. I've tried the regex above and it doesn't seem to work. Why is this?

adit
  • 32,574
  • 72
  • 229
  • 373

1 Answers1

0

You can use the following syntax ^/items/*

monolog:
    handlers:
        main:
            type: fingers_crossed
            action_level: error
            handler: file
            channels: ["!doctrine", "!event", "!security", "!request"]
            excluded_404s:
                - ^/items/*
Remiii
  • 1,102
  • 1
  • 8
  • 12