Comments (16)
If people want to use more sophisticated handlers they could aways use
some of :https://github.com/Seldaek/monolog/tree/master/src/Monolog/Handler
But we already have that capability (for extension) in JLog. Why would you
want to take that away?
from joomla-platform.
Just looking, I thought they defined an interface for the log handlers but it looks like no in fact. Only Logger + Log and levels which are quite similar to what Joomla actually has.
Would have been nice to add LogHandlerInterface too
from joomla-platform.
Yeah, but complying with an interface doesn't mean we have to rip out
perfectly good functionality. All you need to do is add the interface and
proxy the required methods back to our existing functions.
from joomla-platform.
Yes, since we have the same error levels in Joomla it shouldn't be a big big task.
The constructor should become public https://github.com/joomla/joomla-platform/blob/staging/libraries/joomla/log/log.php#L123
In this case https://github.com/php-fig/log/blob/master/Psr/Log/LoggerInterface.php#L113 can be the same than JLog::add
and we can add a non static method setLogger
that do the same than addLogger
from joomla-platform.
For the dependency on the Psr repo we should add it to our composer.json file instead of copying the whole code in the log package.
Since our code will be PSR0 compatible, we will be able to autoload the Psr package.
from joomla-platform.
You wouldn't copy it into the Log package. You'd copy it into a FIG (or yet to be agreed) vendor /libraries/FIG or maybe it will be /libraries/PSR (which I think is preferred but it's bit like making RFC a vendor ... huh?). But for it not to be included, we'd have to talk about modifying the documentation to tell people how to build the Platform. I'm still not convinced we should put all our eggs in the one basket and rely only on Composer (in other words, include the PSR interface anyway).
from joomla-platform.
Yes. We could add the composer.json file and have the library copied in vendor/Psr (like that it matches the folder in which composer will install it). So there is still this fallback for people using the full joomla platform without installing it via composer.
from joomla-platform.
Just as an FYI, I wrote this a couple of days ago: https://github.com/realityking/joomla-platform/compare/psrlog#diff-11
It provides a simple class implementing the PSR-3 interface that internally uses Joomla's logging mechanism. It's not complete but it should serve as an example how it could be done.
from joomla-platform.
@realityking looks nice. I think JLog could extend AbstractLogger
and implement the log
method in favor of the static add
method that could be deprecated.
from joomla-platform.
I think we can retain the folder structure we currently have in regards to "vendor". I have a PR open that adds a few lines to the composer.json file which tells composer where to install packages. I would elect to retain the libraries structure if we can b
Sent from my iPhone
On Jan 12, 2013, at 6:15 AM, Florian Voutzinos [email protected] wrote:
Yes. We could add the composer.json file and have the library copied in vendor/Psr (like that it matches the folder in which composer will install it). So there is still this fallback for people using the full joomla platform without installing it via composer.
—
Reply to this email directly or view it on GitHub.
from joomla-platform.
Awesome guys. OK, maybe we don't need three interfaces for the platform to the same package.
@realityking - looks like you have taken care of things. Would it make sense for us to test out your work and issue PR's (if needed) on your fork?
Assuming that's acceptable, I'll update the discussion on list about moving forward with the JLog interface that Rouven has this covered and where those interested can participate.
from joomla-platform.
Wasn't this where Jira was going to come in, or has that idea fallen by the
wayside already?
Regards,
Andrew Eddie
http://learn.theartofjoomla.com - training videos for Joomla developers
from joomla-platform.
Actually, I think he's waiting on feedback. I know he's put a great of time into setting up the application. He walked me through it a week, or so, ago. Following that, I saw he had posted on list but I don't believe there was a response. I asked if he'd be your right-hand man on this and stay with it, he assured me that was the plan.
from joomla-platform.
I did quickly an example about JLog
https://github.com/florianv/joomla-platform/blob/jlog/libraries/joomla/log/LogHandlerInterface.php
https://github.com/florianv/joomla-platform/blob/jlog/libraries/joomla/log/LogEntry.php
https://github.com/florianv/joomla-platform/blob/jlog/libraries/joomla/log/Log.php
https://github.com/florianv/joomla-platform/blob/jlog/libraries/joomla/log/logger/CallbackHandler.php
from joomla-platform.
Well, the way I'm thinking is that the additions to our standards/policy
can happening a separate pull, combining Don's RFC. If we hone that it
makes it easier to present for wider community consultation, and it is
easier for the PLT to discuss and ratify. In the mean time, those
contributing to the code can be ironing out issues.
Regards,
Andrew Eddie
http://learn.theartofjoomla.com - training videos for Joomla developers
from joomla-platform.
Didn't read this until today.
@AmyStephen The code is quite complete, I'll have to add the context stuff before it's worth testing. I'll try to get to that this week.
from joomla-platform.
Related Issues (20)
- Define and ratify a deprecation strategy for the Joomla Platform HOT 2
- Add extended information to assist new contributors
- Add documentation to the Platform Manual explaining how to edit a file using Gituhub HOT 1
- Set dates for milestones through to 14.1 HOT 9
- RFC 1787: Native PHP Namespacing HOT 75
- config.example.php list db but libraries/database/driver/mysql.php needs options[database] to work HOT 3
- get_html_translation_table requires encoding value for PHP 5.4
- JLoader::NotLoading HOT 6
- PHPUnit Tests not working on PHPUnit 3.7.13
- JTable checked_out_time HOT 5
- Error handling on database connection problems can be improved HOT 5
- JTableAssets::rebuild() does not work HOT 1
- Error with Reply-To Name handling, names are lost HOT 2
- Can not overwrite existing field. HOT 2
- WHy not close issues and pull requests in the administrator for this repo? HOT 2
- JUri::base not taking protocol into account when $live_site is set HOT 1
- version 3.1.4 - problem with jQuery HOT 1
- Please help to solve the problem with Joomla HOT 1
- Tiny issue on JDate week magic get property help text HOT 1
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 joomla-platform.