? Success

User tests: Successful: Unsuccessful:

avatar oisvidi
oisvidi
10 Dec 2014

This was the only static method accessing class variables via self::$instance .

I want to make a wrapper around Monolog for logging. With this I can just add monolog and my wrapper library to composer (which I include elsewhere) and I am good to go.

avatar oisvidi oisvidi - open - 10 Dec 2014
avatar jissues-bot jissues-bot - change - 10 Dec 2014
Labels Added: ?
avatar brianteeman brianteeman - change - 11 Dec 2014
Category Libraries
avatar oisvidi
oisvidi - comment - 11 Dec 2014

My extension class of JLog (not included in commit) simply adds the following lines after the signature has been created. This allows me to initiate and configure the wrapper object (which implements Serializable) elsewhere.

    // Generate a unique signature for the JLog instance based on its options.
    $signature = md5(serialize($options));

    //remember already initialized logger object
    if (
        isset($options['callback'])
        && is_object($options['callback'])
        && ($options['callback'] instanceof JLogLogger)
    ) {
        $this->loggers[$signature] = $options['callback'];
    }
avatar oisvidi
oisvidi - comment - 11 Dec 2014

I had no conflict merging this with #4865 .

avatar wilsonge
wilsonge - comment - 12 Dec 2014

I'll try and test this this weekend. But I definitely like the principle of this :)

avatar wilsonge
wilsonge - comment - 22 Dec 2014

@test : No issues when applying patch. One more tester

avatar Hackwar
Hackwar - comment - 27 Dec 2014

@test works fine, however: Please change the name of the method to something other, because if we start with naming like this, it will get ugly VERY fast. I would propose something like addLoggerInterface()

avatar wilsonge
wilsonge - comment - 27 Dec 2014

Sounds good @oisvidi if you change the method name to what Hannes proposed then I'll get this merged :)

avatar wilsonge wilsonge - change - 14 Mar 2015
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2015-03-14 00:42:14
avatar wilsonge wilsonge - close - 14 Mar 2015
avatar wilsonge wilsonge - reference | - 14 Mar 15
avatar wilsonge wilsonge - merge - 14 Mar 2015
avatar wilsonge wilsonge - close - 14 Mar 2015
avatar wilsonge wilsonge - change - 14 Mar 2015
Milestone Added:

Add a Comment

Login with GitHub to post a comment