mirror of
https://github.com/Seldaek/monolog.git
synced 2026-04-27 08:35:53 +03:00
[PR #720] [MERGED] Created "ProcessHandler", that logs records to the STDIN of a process. #1314
Labels
No labels
Bug
Documentation
Feature
Needs Work
Support
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/monolog#1314
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Seldaek/monolog/pull/720
Author: @ArSn
Created: 1/15/2016
Status: ✅ Merged
Merged: 5/26/2016
Merged by: @Seldaek
Base:
master← Head:master📝 Commits (3)
1be08deCreated "ProcessHandler", that logs records to the STDIN of a custom process, defined by given command.f13011eRemoved obsolete var_export(). Made construction argument validation tests simpler and more readable.fbe0baeReplaced indention tabs with 4 spaces in ProcessHandler and its test.📊 Changes
3 files changed (+418 additions, -0 deletions)
View changed files
📝
doc/02-handlers-formatters-processors.md(+1 -0)➕
src/Monolog/Handler/ProcessHandler.php(+222 -0)➕
tests/Monolog/Handler/ProcessHandlerTest.php(+195 -0)📄 Description
This implements #452, I hope you find it useful.
Some points/questions that I'd like to add here:
proc_open()call has to be quite specific in order for the handler to work properly.Apart from that, I have a few ideas of how to extend this handler, but was not sure about the demand or use cases for that, and hence, left them out for now:
proc_open()also:$envparameter to pass environment variables to the process$other_optionsparameter, that seems to be only doing anything on windows right now (I don't see very much use in implementing this one)proc_close()function actually returns the termination status of the handled process. This could be returned fromProcessHandler::close(), as it may be helpful for some.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.