Comments (1)
Yes, you are absolutely right. There are still a few things missing. What you are mentioning is part of it.
I referenced that in a blog post I wrote. https://medium.com/orchard-technology/enhancing-monolog-699efff1051d (See Limitations section). I should probably add that to the ReadMe as well cause it impacts a bunch of handlers.
I haven't given it too much thoughts yet but feel free to take a stab at it and submit a PR.
The main challenge here is to be able to translate a statement like
new Raven_Client($someArg, $anotherArg, ...);
into something much simpler like a Yaml syntax and to have it flexible enough so it does support instantiating any classes passing a bunch of args.
Something along
handlers:
raven_handler:
class: Monolog\Handler\RavenHandler
raven_client:
class: Raven_Client
options_or_dsn: "xxx"
level: WARNING
would be ideal and would allow to reuse the class loader. It would require adding more recursion to the parsing. (=> This is just a quick thought.)
For now the only workaround I see is to use a Php array as your config. I haven't tried though, but it might work.
I'll leave this issue open in case someone wants to take a stab at it.
from monolog-cascade.
Related Issues (20)
- PHP 8 compatibility HOT 4
- Update to PHPUnit9.X to resolve PHP8 dev-dependency chain
- Release 0.6 pre-release with tag name that makes Composer happy HOT 1
- default namespace for handler HOT 3
- support for 'extends' on loggers HOT 2
- Log Rotate HOT 2
- "array" missing as possible param type in Cascade::fileConfig HOT 1
- Add default logger HOT 2
- there is a typo
- File permissions on handler HOT 1
- Namespaced logger configuration HOT 4
- Getting the streamhandler URL(s) HOT 2
- YAML config file ignored HOT 3
- Rollbar configuration example
- monolog-cascade doesn't create log folders and file HOT 2
- Public property with uppercase at the beginning ends with error
- Support for monolog "^2.0"? HOT 8
- PHP 7.4 deprecations HOT 2
- GitHub -> Packagist sync has failed HOT 1
- Provide functionality `Cascade::hasLogger()`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from monolog-cascade.