Code Monkey home page Code Monkey logo

Comments (16)

eddieajau avatar eddieajau commented on August 16, 2024

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.

florianv avatar florianv commented on August 16, 2024

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.

eddieajau avatar eddieajau commented on August 16, 2024

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.

florianv avatar florianv commented on August 16, 2024

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 setLoggerthat do the same than addLogger

from joomla-platform.

florianv avatar florianv commented on August 16, 2024

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.

eddieajau avatar eddieajau commented on August 16, 2024

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.

florianv avatar florianv commented on August 16, 2024

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.

realityking avatar realityking commented on August 16, 2024

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.

florianv avatar florianv commented on August 16, 2024

@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.

dongilbert avatar dongilbert commented on August 16, 2024

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.

AmyStephen avatar AmyStephen commented on August 16, 2024

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.

eddieajau avatar eddieajau commented on August 16, 2024

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.

AmyStephen avatar AmyStephen commented on August 16, 2024

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.

florianv avatar florianv commented on August 16, 2024

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.

eddieajau avatar eddieajau commented on August 16, 2024

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.

realityking avatar realityking commented on August 16, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.