Comments (14)
@alexpts Why do you think that is needed, what change you would made? MonologFactory already requires nikolaposa/cascader:^1.0
so running: composer update --with-dependencies nikolaposa/monolog-factory
should update Cascader to the latest version.
from monolog-factory.
I will make PR for repo cascader
from monolog-factory.
I prepare PR. It will work:
$loggerFactory = new LoggerFactory();
$logger = $loggerFactory->createLogger('logger', [
'handlers' => [
[
'name' => BufferHandler::class,
'options' => [
'handler' => [
'__class__' => NativeMailerHandler::class,
'options' => [
'to' => '[email protected]',
'subject' => 'Test',
'from' => '[email protected]',
'level' => Logger::ALERT,
'formatter' => [
'name' => HtmlFormatter::class,
],
],
]
]
]
]
]);
from monolog-factory.
Hi @alexpts, are you sure your first example doesn't work? What do you end up with after running it? I have a similar case covered in my tests: https://github.com/nikolaposa/monolog-factory/blob/master/tests/LoggerFactoryTest.php#L225
from monolog-factory.
Ok, I got it, it won't work in case of interface parameter type hints. Thanks for reporting this!
from monolog-factory.
I will wait release with updated version cascader package. Thanks!
from monolog-factory.
Issue is fixed with the latest (1.1.0
) release of nikolaposa/cascader. Please update.
from monolog-factory.
I mean new version nikolaposa/monolog-factory
package :)
from monolog-factory.
You are right :)
from monolog-factory.
But you know what, perhaps I should explicitly require cascader:^1.1 and bump patch version of MonologFactory so that folks are aware of that change. I think I'll do that.
from monolog-factory.
@alexpts Done. Can you please try running composer update nikolaposa/monolog-factory
in your project and see whether both Monolog Factory and Cascader will be updated? Thanks.
from monolog-factory.
Thanks!
from monolog-factory.
New correct config:
$loggerFactory = new LoggerFactory();
$logger = $loggerFactory->createLogger('logger', [
'handlers' => [
[
'name' => BufferHandler::class,
'options' => [
'handler' => [
'__class__' => NativeMailerHandler::class,
'to' => '[email protected]',
'subject' => 'Test',
'from' => '[email protected]',
'level' => Logger::ALERT,
'formatter' => [
'name' => HtmlFormatter::class,
],
]
]
]
]
]);
from monolog-factory.
Cool, thanks a lot for the help
from monolog-factory.
Related Issues (7)
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-factory.