[PR #63] [MERGED] SocketHandler implementation using fsockopen() #912

Closed
opened 2026-03-04 03:02:40 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Seldaek/monolog/pull/63
Author: @pablolb
Created: 2/26/2012
Status: Merged
Merged: 4/22/2012
Merged by: @Seldaek

Base: masterHead: master


📝 Commits (10+)

  • 486cbb7 Initial version
  • d75e0b7 Add some documentation
  • 423cfeb Add license header and move @author to phpdoc
  • d752f43 Remove Socket, PeristentSocket and MockSocket classes
  • ff287b9 Fix docs
  • 9f5681f add licensce and move @author to phpdoc
  • cc9c022 Fix doc/sockets.md
  • 722cabc Remove old SocketTest. Fix CS issues
  • 83e1e2d Improve tests on SocketHandler
  • bee3e1b Remove SocketHandler's ConnecitonException and WriteToSocketException - replace them with \UnexpectedValueException and \RuntimeException respectively

📊 Changes

4 files changed (+597 additions, -0 deletions)

View changed files

📝 README.mdown (+1 -0)
doc/sockets.md (+37 -0)
src/Monolog/Handler/SocketHandler.php (+274 -0)
tests/Monolog/Handler/SocketHandlerTest.php (+285 -0)

📄 Description

Hi,

This implementation uses fsockopen() allowing you to log to UNIX and TCP sockets - I've written a small document here:

https://github.com/pablolb/monolog/blob/master/doc/sockets.md

I've played a bit with it using a simple TCP server and replicating a production environment (2 webs writing logs to one syslog-ng server) - I hope I can test it in production this week.

Any comments are appreciated.

Best regards,
Pablo


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Seldaek/monolog/pull/63 **Author:** [@pablolb](https://github.com/pablolb) **Created:** 2/26/2012 **Status:** ✅ Merged **Merged:** 4/22/2012 **Merged by:** [@Seldaek](https://github.com/Seldaek) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (10+) - [`486cbb7`](https://github.com/Seldaek/monolog/commit/486cbb78abcd5e7ebed799b98725826df036023b) Initial version - [`d75e0b7`](https://github.com/Seldaek/monolog/commit/d75e0b73f38ad4c1d6bd61166140e237dea70cb4) Add some documentation - [`423cfeb`](https://github.com/Seldaek/monolog/commit/423cfebf94df25f993978e76e5300b1bafbd55a7) Add license header and move @author to phpdoc - [`d752f43`](https://github.com/Seldaek/monolog/commit/d752f435b502f0a09e4db71d7b99fff2b73db403) Remove Socket, PeristentSocket and MockSocket classes - [`ff287b9`](https://github.com/Seldaek/monolog/commit/ff287b9d10071513b006f193d188e847d4a5a95f) Fix docs - [`9f5681f`](https://github.com/Seldaek/monolog/commit/9f5681fa8175db75610d9456a164292dc7e353ed) add licensce and move @author to phpdoc - [`cc9c022`](https://github.com/Seldaek/monolog/commit/cc9c02250ca3119fd8954155790d4d5872ea9434) Fix doc/sockets.md - [`722cabc`](https://github.com/Seldaek/monolog/commit/722cabc5352d91aa2d7f17cddaf16c1dac1d80af) Remove old SocketTest. Fix CS issues - [`83e1e2d`](https://github.com/Seldaek/monolog/commit/83e1e2d80a4933e5019d396b9466fec5690fb393) Improve tests on SocketHandler - [`bee3e1b`](https://github.com/Seldaek/monolog/commit/bee3e1bca4c1a9ed45e3b0671a2327bdc4720380) Remove SocketHandler's ConnecitonException and WriteToSocketException - replace them with \UnexpectedValueException and \RuntimeException respectively ### 📊 Changes **4 files changed** (+597 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `README.mdown` (+1 -0) ➕ `doc/sockets.md` (+37 -0) ➕ `src/Monolog/Handler/SocketHandler.php` (+274 -0) ➕ `tests/Monolog/Handler/SocketHandlerTest.php` (+285 -0) </details> ### 📄 Description Hi, This implementation uses fsockopen() allowing you to log to UNIX and TCP sockets - I've written a small document here: https://github.com/pablolb/monolog/blob/master/doc/sockets.md I've played a bit with it using a simple TCP server and replicating a production environment (2 webs writing logs to one syslog-ng server) - I hope I can test it in production this week. Any comments are appreciated. Best regards, Pablo --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-04 03:02:40 +03:00
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#912
No description provided.