mirror of
https://github.com/Seldaek/monolog.git
synced 2026-04-25 23:55:56 +03:00
[GH-ISSUE #14] configuration file support #1
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#1
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?
Originally created by @ykhrustalev on GitHub (Apr 18, 2011).
Original GitHub issue: https://github.com/Seldaek/monolog/issues/14
Hi
Monolog looks very light and simple what makes it attractive to use in other projects not related to Symfony.
Is it possible to add configuration file to allow specify some channel options.
For the channel name
Some thing like is done in Symfony2 config but in very simple way.
May be it is a goo idea to create factory method to get loggers by the channel name.
Hope you find that issue reasonable.
@Seldaek commented on GitHub (Apr 19, 2011):
It's certainly possible, but it's not that much code to write yourself to set up your handlers. I'm not sure if this is really valuable, I'd say it's more something that should be done in whichever project integrates monolog (be it homegrown or a framework like Sf2).
I mean in most cases you need one or two handlers, and you need some point where you integrate monolog anyway, so why not add those few lines of setup code there?
As for the factory method, that sounds like a glorified singleton what you're saying, and I really don't think that's the best idea. You can do it easily by extending the Logger class, or by stashing logger instances anywhere else, but I don't think this belongs in the library.