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.mellanox.hadoop.mapred.UdaPlugin.java

private static void setLog(String logging_name) {
    LOG = LogFactory.getLog(logging_name);
}

From source file:com.teletalk.jserver.util.aop.MethodInvocationDebugLogger.java

/**
 *//* w  w w  .  j av a2 s  . co m*/
public void setLoggerName(final String loggerName) {
    this.loggerName = loggerName;
    if ((this.loggerName != null) && (this.loggerName.trim().length() > 0))
        this.logger = LogFactory.getLog(this.loggerName);
}

From source file:dk.statsbiblioteket.util.LogsTest.java

public void testNullExpansion() {
    Log log = LogFactory.getLog(LogsTest.class);
    Logs.logExpand(log, Logs.Level.WARN, "Null expansion:", (Object[]) null);
}

From source file:com.alfaariss.oa.authentication.password.radius.RadiusPasswordHandler.java

/**
 * Default constructor of <code>RadiusPasswordHandler</code>.
 */
public RadiusPasswordHandler() {
    _logger = LogFactory.getLog(RadiusPasswordHandler.class);
}

From source file:com.berwickheights.spring.mvc.controller.ErrorPageController.java

@Override
protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response)
        throws Exception {
    Map<String, Object> args = new HashMap<String, Object>();

    Throwable t = (Throwable) request.getAttribute("javax.servlet.error.exception");
    if (t != null) {
        LogFactory.getLog("ErrorPage").error("Exception caught by error page", t);
    } else if ("500".equals(request.getAttribute("javax.servlet.error.status_code"))) {
        LogFactory.getLog("ErrorPage")
                .error("An internal error (500) has occurred but no Exception object was found in request");
    }// w ww.  j a va  2 s  .  co m

    if (request.getAttribute("javax.servlet.error.status_code") != null) {
        args.put("statusCode", request.getAttribute("javax.servlet.error.status_code"));
    } else {
        args.put("statusCode", request.getParameter("err"));
    }
    return new ModelAndView(getViewName(), "args", args);
}

From source file:com.alfaariss.oa.engine.core.server.Organization.java

/**
 * Creates the object.// www  . ja  v a 2  s  . co m
 * @param oConfigurationManager the configuration manager where the 
 * configuration can be read from.
 * @param eConfig the configuration section for this object
 * @throws OAException If configuration is invalid
 */
public Organization(IConfigurationManager oConfigurationManager, Element eConfig) throws OAException {
    try {
        _logger = LogFactory.getLog(Organization.class);

        _sID = oConfigurationManager.getParam(eConfig, "id");
        if (_sID == null || _sID.trim().length() <= 0) {
            _logger.error("No 'id' item found in 'organization' section in configuration");
            throw new OAException(SystemErrors.ERROR_CONFIG_READ);
        }
        _sFriendlyName = oConfigurationManager.getParam(eConfig, "friendlyname");
        if (_sFriendlyName == null || _sFriendlyName.trim().length() <= 0) {
            _logger.error("No 'friendlyname' item found in 'organization' section in configuration");
            throw new OAException(SystemErrors.ERROR_CONFIG_READ);
        }
    } catch (OAException e) {
        throw e;
    } catch (Exception e) {
        _logger.fatal("Internal error during initialize", e);
        throw new OAException(SystemErrors.ERROR_INTERNAL);
    }
}

From source file:com.lfv.yada.net.client.Distributor.java

public Distributor(int terminalId, ClientBundle bundle, ItemDispatcher dispatcher) {
    log = LogFactory.getLog(getClass());

    this.terminalId = terminalId;
    this.bundle = bundle;
    this.dispatcher = dispatcher;

    radioChannelList = new LinkedList<Integer>();
    radioUnicastList = new LinkedList<ClientTerminal>();
}

From source file:net.sf.nmedit.waldorf.miniworks4pole.WMFileService.java

public void newFile() {
    try {//ww w.  ja v  a  2  s  .  c  o  m
        Nomad.sharedInstance().getDocumentManager().add(new MWPatchDoc(MWData.createPatch()));
    } catch (Exception e) {
        Log log = LogFactory.getLog(getClass());
        if (log.isWarnEnabled()) {
            log.warn(e);
        }
        return;
    }
}

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

@Override
public void setDataSourceLoggerName(String dataSourceLoggerName) {
    this.dataSourceLoggerName = dataSourceLoggerName;
    dataSourceLogger = LogFactory.getLog(dataSourceLoggerName);
}

From source file:com.lfv.yada.net.BasePacketReceiver.java

/**
 * Creates a BasePacketReceiver instance. The sockets are instanciated externally
 * and must be passed in the constructor. The multicast socket may be null.
 */// www  .  jav a  2s.  co  m
public BasePacketReceiver(DatagramSocket unicastSocket, MulticastSocket multicastSocket) {
    // Create a logger for this class
    log = LogFactory.getLog(getClass());

    // Creating a receiver for unicast packets
    unicastReceiver = new UnicastReceiver(unicastSocket);

    if (multicastSocket != null)
        multicastReceiver = new MulticastReceiver(multicastSocket);
}