public function getLogger($namespace = '', $class = '', $method = '')
    {
        // Remove any potential namespace from the class and method names.
        $class = substr($class, strrpos('\\' . $class, '\\'));
        $method = substr($method, strrpos('\\' . $method, '\\'));

        // If __METHOD__ was used instead of __FUNCTION__, it also contains
        // the class name as a prefix. We get rid of that too.
        $method = substr((string) $method, strrpos(':' . $method, ':'));

        return $this["$method:$class:$namespace"];
    }
public function getLogger($namespace = '', $class = '', $method = '')
    {
        // Remove any potential namespace from the class and method names.
        $class = substr($class, strrpos('\\' . $class, '\\'));
        $method = substr($method, strrpos('\\' . $method, '\\'));

        // If __METHOD__ was used instead of __FUNCTION__, it also contains
        // the class name as a prefix. We get rid of that too.
        $method = substr((string) $method, strrpos(':' . $method, ':'));

        return $this["$method:$class:$namespace"];
    }
public function getLogger ( $ namespace = '' , $ class = '' , $ method = '' ) { // Remove any potential namespace from the class and method names. $ class = substr ( $ class , strrpos ( '\\' . $ class , '\\' ) ) ; $ method = substr ( $ method , strrpos ( '\\' . $ method , '\\' ) ) ; // If __METHOD__ was used instead of __FUNCTION__, it also contains // the class name as a prefix. We get rid of that too. $ method = substr ( ( string ) $ method , strrpos ( ':' . $ method , ':' ) ) ; return $ this [ "$method:$class:$namespace" ] ; }
Return the logger that is most appropriate
given a bit of context.

\param string $namespace
(optional) Namespace for which a logger
must be returned.
Most of the time, you will pass the value
of \a \_\_NAMESPACE\_\_ to this parameter.

\param string $class
(optional) Class for which a logger must be
returned.
Most of the time, you will pass the value
of \a \_\_CLASS\_\_ to this parameter.

\param string $method
(optional) Method inside the given class
for which a logger must be returned.
Most of the time, you will pass the value
of \a \_\_FUNCTION\_\_ to this parameter,
even for methods, where this will have
the same value as \a \_\_FUNCTION\_\_.

\retval Plop::LoggerInterface
Logger that is the most appropriate given
the context.

\note
For functions, pass \a null as the value
for the \a $class parameter.

\warning
When the default value is kept for every
parameter, this method will return the root
logger. It will not try to get the values
of \a \_\_NAMESPACE\_\_, \a \_\_CLASS\_\_
and \a \_\_FUNCTION\_\_ automatically.
If you need more magic than that, keep in mind
that the Plop class also implements the
Plop::LoggerInterface interface to provide
shortcuts.
Therefore,
\code
$logging->info('The quick brown fox jumps over the lazy dog');
\endcode
is equivalent to
\code
$logging
->getLogger(__NAMESPACE__, __CLASS__, __FUNCTION__)
->info('The quick brown fox jumps over the lazy dog');
\endcode
Return the logger that is most appropriate given a bit of context .