src/Vatsimphp/Log/LoggerFactory.php
public static function get($channel)
    {
        // in case an object is passed in we use the base class name as the channel
        if (is_object($channel)) {
            $ref = new \ReflectionClass($channel);
            $channel = $ref->getShortName();
        }

        // custom log channels need to be registered in advance using self::register()
        if (!self::channelExists($channel)) {

            // use default logger object if set or fallback to builtin logger
            if (self::channelExists(self::DEFAULT_LOGGER)) {
                self::$loggers[$channel] = self::$loggers[self::DEFAULT_LOGGER];
            } else {
                $file = empty(self::$file) ? __DIR__.'/../../../app/logs/vatsimphp.log' : self::$file;
                self::$loggers[$channel] = new Logger($channel, $file, self::$level);
            }
        }

        return self::$loggers[$channel];
    }
public static function get($channel)
    {
        // in case an object is passed in we use the base class name as the channel
        if (is_object($channel)) {
            $ref = new \ReflectionClass($channel);
            $channel = $ref->getShortName();
        }

        // custom log channels need to be registered in advance using self::register()
        if (!self::channelExists($channel)) {

            // use default logger object if set or fallback to builtin logger
            if (self::channelExists(self::DEFAULT_LOGGER)) {
                self::$loggers[$channel] = self::$loggers[self::DEFAULT_LOGGER];
            } else {
                $file = empty(self::$file) ? __DIR__.'/../../../app/logs/vatsimphp.log' : self::$file;
                self::$loggers[$channel] = new Logger($channel, $file, self::$level);
            }
        }

        return self::$loggers[$channel];
    }
public static function get ( $ channel ) { // in case an object is passed in we use the base class name as the channel if ( is_object ( $ channel ) ) { $ ref = new \ ReflectionClass ( $ channel ) ; $ channel = $ ref -> getShortName ( ) ; } // custom log channels need to be registered in advance using self::register() if ( ! self :: channelExists ( $ channel ) ) { // use default logger object if set or fallback to builtin logger if ( self :: channelExists ( self :: DEFAULT_LOGGER ) ) { self :: $ loggers [ $ channel ] = self :: $ loggers [ self :: DEFAULT_LOGGER ] ; } else { $ file = empty ( self :: $ file ) ? __DIR__ . '/../../../app/logs/vatsimphp.log' : self :: $ file ; self :: $ loggers [ $ channel ] = new Logger ( $ channel , $ file , self :: $ level ) ; } } return self :: $ loggers [ $ channel ] ; }
Load logger object.

@param string|object $channel

@return \Psr\Log\LoggerInterface
Load logger object .