Example usage for org.apache.commons.logging LogFactory getLog

List of usage examples for org.apache.commons.logging LogFactory getLog

Introduction

In this page you can find the example usage for org.apache.commons.logging LogFactory getLog.

Prototype

public static Log getLog(String name) 

Source Link

Document

Convenience method to return a named logger.

Usage

From source file:com.alfaariss.oa.util.saml2.storage.artifact.memory.MemoryArtifactMapFactory.java

/**
  * Create a new <code>JDBCFactory</code>.
  *//*www .  j  ava  2s  .c om*/
public MemoryArtifactMapFactory() {
    super();
    _logger = LogFactory.getLog(MemoryArtifactMapFactory.class);
    _storage = new HashMap<>();
}

From source file:com.alfaariss.oa.engine.core.EngineLauncher.java

/**
 * Creates the object.//w w w  . j  a va2 s  .  c  om
 * @throws OAException 
 */
public EngineLauncher() throws OAException {
    try {
        _logger = LogFactory.getLog(EngineLauncher.class);
        _configurationManager = ConfigurationManager.getInstance();
        _engine = Engine.getInstance();
    } catch (Exception e) {
        _logger.error("Internal error while creating object", e);
        throw new OAException(SystemErrors.ERROR_INTERNAL);
    }
}

From source file:com.alfaariss.oa.authentication.password.AbstractPasswordHandler.java

/**
 * Constructor. Must be called by its children.
 */// w w w.  ja  va2 s .c o m
public AbstractPasswordHandler() {
    _resourceHandlers = new Hashtable<String, IResourceHandler>();
    _logger = LogFactory.getLog(this.getClass());
}

From source file:es.caib.seycon.ng.servei.ConfiguracioServiceImpl.java

/**
 * Method that implements the functionality to reconfigure NAS.
 * @param configuracio/*from ww w .j a v a  2 s . com*/
 * @throws InstantiationException
 * @throws IllegalAccessException
 * @throws ClassNotFoundException
 * @throws NASException
 */
private void reconfigureNAS(Configuracio configuracio)
        throws InstantiationException, IllegalAccessException, ClassNotFoundException, NASException {
    try {
        if (checkAllConfigurationSet(configuracio)) {
            NASManager.getInstance();
            NASManager.loadConfiguration();
        }
    }

    catch (NASException ex) {
        Log log = LogFactory.getLog(getClass());
        log.warn(String.format("Document manager: parameter not defined: %1$s", //$NON-NLS-1$
                configuracio.getCodi()));
    }
}

From source file:com.spoledge.audao.parser.gql.impl.soft.SoftColumnExpr.java

@Override
public Object getValue(Object[] args, Entity ent) {
    // walk the subtree

    GqlExtExprTree parser = new GqlExtExprTree(new CommonTreeNodeStream(tree));

    try {/*from  w w w.  j  a va2s. c o  m*/
        return parser.expr(args, ent);
    } catch (RecognitionException e) {
        LogFactory.getLog(getClass()).error("getValue(): " + e + ", tree=" + tree.toStringTree());

        throw new RuntimeException(e);
    } catch (RuntimeException e) {
        LogFactory.getLog(getClass()).error("getValue(): tree=" + tree.toStringTree(), e);

        throw e;
    }
}

From source file:net.sf.janos.ui.action.PauseResumeAction.java

public void widgetSelected(SelectionEvent e) {
    SonosControllerShell controllerShell = ApplicationContext.getInstance().getShell();
    SonosController controller = ApplicationContext.getInstance().getController();
    ZonePlayer zone = controller.getCoordinatorForZonePlayer(controllerShell.getZoneList().getSelectedZone());
    try {/*from w  w  w.  j a va 2  s .  c om*/
        AVTransportService avTransportService = zone.getMediaRendererDevice().getAvTransportService();
        if (avTransportService.getTransportInfo().getState().equals(TransportState.PLAYING)) {
            avTransportService.pause();
        } else {
            avTransportService.play();
        }
    } catch (IOException ex) {
        LogFactory.getLog(getClass()).error("Could not pause/resume playback", ex);
    } catch (UPNPResponseException ex) {
        LogFactory.getLog(getClass()).error("Could not pause/resume playback", ex);
    }
}

From source file:bdi4jade.examples.BDI4JADEExamplesApp.java

public BDI4JADEExamplesApp() {
    this.log = LogFactory.getLog(this.getClass());
    this.agentTestPanel = new BDI4JADEExamplesPanel();

    List<String> params = new ArrayList<String>();
    params.add("-gui");
    params.add("-detect-main:false");

    log.info("Plataform parameters: " + params);

    this.bootProfile = new BootProfileImpl(params.toArray(new String[0]));

    this.runtime = jade.core.Runtime.instance();
    PlatformController controller = runtime.createMainContainer(bootProfile);

    Map<String, Agent> agents = agentTestPanel.getAgents();
    for (String agentName : agents.keySet()) {
        try {/* w w  w.  j a va 2s  . com*/
            AgentController ac = ((AgentContainer) controller).acceptNewAgent(agentName, agents.get(agentName));
            ac.start();
        } catch (Exception e) {
            log.error(e);
        }
    }
}

From source file:net.sourceforge.eclipsetrader.trading.internal.watchlist.ColumnRegistry.java

public static ILabelProvider createLabelProvider(String id) {
    IConfigurationElement element = (IConfigurationElement) map.get(id);
    if (element != null) {
        try {/*from w  ww .j a  v  a  2 s.c om*/
            Object obj = element.createExecutableExtension("class");
            return (ILabelProvider) obj;
        } catch (Exception e) {
            LogFactory.getLog(ColumnRegistry.class).error(e, e);
        }
    }

    return null;
}

From source file:com.alfaariss.oa.profile.aselect.binding.protocol.cgi.CGIBinding.java

/**
 * Creates the object. //from  w ww .  j  a  v  a 2 s  . c  o  m
 * @param oServletRequest The servlet request object.
 * @param oServletResponse The servlet response object.
 * @throws BindingException if binding creation fails
 */
public CGIBinding(HttpServletRequest oServletRequest, HttpServletResponse oServletResponse)
        throws BindingException {
    try {
        _logger = LogFactory.getLog(CGIBinding.class);
        _oServletRequest = oServletRequest;
        _oServletResponse = oServletResponse;
        _oCGIRequest = new CGIRequest(_oServletRequest);
    } catch (BindingException e) {
        throw e;
    } catch (Exception e) {
        _logger.fatal("Internal error during CGI binding creation", e);
        throw new BindingException(SystemErrors.ERROR_INTERNAL);
    }
}

From source file:com.alibaba.druid.filter.logging.CommonsLogFilter.java

@Override
public void setConnectionLoggerName(String connectionLoggerName) {
    this.connectionLoggerName = connectionLoggerName;
    connectionLogger = LogFactory.getLog(connectionLoggerName);
}