Fix session store logging
authorBrad Jorsch <bjorsch@wikimedia.org>
Mon, 22 Feb 2016 14:01:25 +0000 (09:01 -0500)
committerBryanDavis <bdavis@wikimedia.org>
Mon, 22 Feb 2016 17:13:03 +0000 (17:13 +0000)
Two things were wrong here:
1. SessionManager shouldn't override the configured logger of the
   underlying store.
2. CachedBagOStuff shouldn't override the configured logger of the
   backend store on construction.

Change-Id: I24ed5a81d5b238a42934a7890dd8d0a9f9bb3b6f

includes/libs/objectcache/CachedBagOStuff.php
includes/session/SessionManager.php

index c71b16e..798357d 100644 (file)
@@ -76,11 +76,6 @@ class CachedBagOStuff extends HashBagOStuff {
                return true;
        }
 
-       public function setLogger( LoggerInterface $logger ) {
-               parent::setLogger( $logger );
-               $this->backend->setLogger( $logger );
-       }
-
        public function setDebug( $bool ) {
                parent::setDebug( $bool );
                $this->backend->setDebug( $bool );
index 0abec1b..8695b68 100644 (file)
@@ -168,7 +168,6 @@ final class SessionManager implements SessionManagerInterface {
                        $store = $options['store'];
                } else {
                        $store = \ObjectCache::getInstance( $this->config->get( 'SessionCacheType' ) );
-                       $store->setLogger( $this->logger );
                }
                $this->store = $store instanceof CachedBagOStuff ? $store : new CachedBagOStuff( $store );