Returns the current LoggerContext.
<p>
WARNING - The LoggerContext returned by this method may not be the LoggerContext used to create a Logger for the
calling class.
</p>

@return The current LoggerContext.
169394
public static LoggerContext getContext() {
        try {
            return factory.getContext(FQCN, null, null, true);
        } catch (final IllegalStateException ex) {
            LOGGER.warn(ex.getMessage() + " Using SimpleLogger");
            return new SimpleLoggerContextFactory().getContext(FQCN, null, null, true);
        }
    }
927867
private Context getContext(ExecutionContext executionContext) {
        // Get context id.
        HttpServletRequest request = executionContext.getActionBeanContext().getRequest();
        String parameter = request.getParameter(ID_PARAMETER);
        
        // Return context.
        if (parameter != null) {
            int id = Integer.parseInt(parameter, 16);
            return contexts.get(id);
        }
        
        return null;
    }
563288
public static ClassLoader getContextClassLoader() {
        return AccessController.doPrivileged(new PrivilegedAction<ClassLoader>() {
            @Override
            public ClassLoader run() {
                ClassLoader cl = null;
                try {
                    cl = Thread.currentThread().getContextClassLoader();
                } catch (final SecurityException ex) {
                    // fall through
                }
                return cl;
            }
        });
    }
1217520
protected Context getContext() {
        if (context == null) {
            context = getTomcat().addContext(getConfig().getContextPath(),
                    getConfig().getContextRootDirectory().getAbsolutePath());
        }
        return context;
    }
937666
public ConcurrentMap<String, L> getLoggersInContext(final LoggerContext context) {
        ConcurrentMap<String, L> loggers;
        lock.readLock ().lock ();
        try {
            loggers = registry.get (context);
        } finally {
            lock.readLock ().unlock ();
        }

        if (loggers != null) {
            return loggers;
        } else {
            lock.writeLock ().lock ();
            try {
                loggers = registry.get (context);
                if (loggers == null) {
                    loggers = new ConcurrentHashMap<> ();
                    registry.put (context, loggers);
                }
                return loggers;
            } finally {
                lock.writeLock ().unlock ();
            }
        }
    }
1150058
protected ELContext getELContext() {
	FacesContext fc = getFacesContext();
	ELContext result = null;
	if (null != fc) {
	    result = fc.getELContext();
	}
	return result;
    }
1199841
private Logger log()
    {

        if (log == null)
        {
            log = Logger.getLogger(_PackageInfo.class.getName());
        }
        return log;

    }
310764
public static ClassLoader getContextClassLoader() {
        ClassLoader loader = null;
        try {
            loader = Thread.currentThread().getContextClassLoader();
        } catch (Throwable e) {
        }
        if (loader == null) {
            loader = ClassUtils.class.getClassLoader();
        }
        return loader;
    }
225143
def get_logger(context=None, name=None):
    
    # Many class instances have their own logger. Share them to save memory if
    # possible, i.e. when *context* is not set.
    if name is None:
        name = _logger_name
    if context is None and name in _logger_dict:
        return _logger_dict[name]
    if context is not None and not isinstance(context, six.string_types):
        context = util.objref(context)
    logger = logging.getLogger(name)
    logger = ContextLogger(logger, context)
    if context is None:
        _logger_dict[name] = logger
    return logger
800910
public java.util.logging.Logger getParentLogger() throws java.sql.SQLFeatureNotSupportedException {
        throw new java.sql.SQLFeatureNotSupportedException();
    }
1061108
protected Context getContext() {
        if (act != null) {
            return act;
        }
        if (root != null) {
            return root.getContext();
        }
        return context;
    }
461318
public static LogManagementPlugin getLogManagementPlugin() {
		final String loggerImpl = org.slf4j.impl.StaticLoggerBinder
				.getSingleton().getLoggerFactoryClassStr();
		if ("Log4jLoggerFactory﻿".equals(loggerImpl.substring(loggerImpl
						.lastIndexOf(".") + 1))) {
			return new LogManagementPluginLog4jImpl();
		} else if (loggerImpl.indexOf("logback.") > 1
				&& "ContextSelectorStaticBinder".equals(loggerImpl
						.substring(loggerImpl.lastIndexOf(".") + 1))) {
			return new LogManagementPluginLogbackImpl();
		}
		throw new UnsupportedOperationException();
	}
611873
private Context getContext() {
        Context context = mContext.get();
        if (context == null) {
            throw new IllegalStateException("Context used by the instance has been destroyed.");
        }
        return context;
    }
664439
public function getContext(): Context
    {
        if ($this->context === null) {
            $this->context = new Context;
        }

        return $this->context;
    }
969497
public BuildLogger getLogger() {
    @SuppressWarnings("unchecked") final List<? extends BuildListener> listeners = getProject().getBuildListeners();
    assert listeners.size() > 0;
    return (BuildLogger)listeners.get(0);
  }
880452
public ThreadDelegatedContext getContext()
    {
        ThreadDelegatedContext context = threadLocal.get();
        if (context == null) {
            context = new ThreadDelegatedContext();
            threadLocal.set(context);
        }
        return context;
    }
927975
public Context getSelectedContext() {
		SiteNode node = (SiteNode) treeContext.getLastSelectedPathComponent();
		if (node == null || node.isRoot()) {
			return null;
		}
		Target target = (Target) node.getUserObject();
		if (target != null) {
			return target.getContext();
		}
		return null;
	}