[GH-ISSUE #36] WebProcessor in command line #7

Closed
opened 2026-03-04 02:11:17 +03:00 by kerem · 1 comment
Owner

Originally created by @maxailloud on GitHub (Jul 6, 2011).
Original GitHub issue: https://github.com/Seldaek/monolog/issues/36

I don't know if it's a bug or not so i'll submit it anyway.

I just configured my application to log in a file when in 'dev' environment with a WebProcessor associated.
It works fine in a navigator, but when i launched a command in the command line i get this error:
Notice: Undefined index: REQUEST_URI in /home/mailloud/workspace/referentiel/vendor/monolog/src/Monolog/Processor/WebProcessor.php line 46

It's normal that 'REQUEST_URI' doesn't exist while w're not in a http process, and so no uri.

I think when call in command line this kind of processor should not work, and the fact that the command is launched in 'dev' mode should not change that.

With the option 'no-debug' the command works without problem bu at this time no log, not wanted if log are configured.

Originally created by @maxailloud on GitHub (Jul 6, 2011). Original GitHub issue: https://github.com/Seldaek/monolog/issues/36 I don't know if it's a bug or not so i'll submit it anyway. I just configured my application to log in a file when in 'dev' environment with a WebProcessor associated. It works fine in a navigator, but when i launched a command in the command line i get this error: _Notice: Undefined index: REQUEST_URI in /home/mailloud/workspace/referentiel/vendor/monolog/src/Monolog/Processor/WebProcessor.php line 46_ It's normal that 'REQUEST_URI' doesn't exist while w're not in a http process, and so no uri. I think when call in command line this kind of processor should not work, and the fact that the command is launched in 'dev' mode should not change that. With the option 'no-debug' the command works without problem bu at this time no log, not wanted if log are configured.
kerem closed this issue 2026-03-04 02:11:18 +03:00
Author
Owner

@Seldaek commented on GitHub (Jul 6, 2011):

I don't think the WebProcessor is too useful in dev environment, but it still shouldn't crash in CLI, so it's fixed.

<!-- gh-comment-id:1511695 --> @Seldaek commented on GitHub (Jul 6, 2011): I don't think the WebProcessor is too useful in dev environment, but it still shouldn't crash in CLI, so it's fixed.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/monolog#7
No description provided.