当前位置: 首页>>代码示例>>Java>>正文


Java Log.debug方法代码示例

本文整理汇总了Java中org.mortbay.log.Log.debug方法的典型用法代码示例。如果您正苦于以下问题:Java Log.debug方法的具体用法?Java Log.debug怎么用?Java Log.debug使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.mortbay.log.Log的用法示例。


在下文中一共展示了Log.debug方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: configureClassLoader

import org.mortbay.log.Log; //导入方法依赖的package包/类
/**
 * Set up the classloader for the webapp, using the various parts of the Maven project
 *
 * @see org.mortbay.jetty.webapp.Configuration#configureClassLoader()
 */
public void configureClassLoader() throws Exception {
    if (classPathFiles != null) {
        Log.debug("Setting up classpath ...");

        //put the classes dir and all dependencies into the classpath
        for (File classPathFile : classPathFiles) {
            ((WebAppClassLoader) getWebAppContext().getClassLoader()).addClassPath(
                    classPathFile.getCanonicalPath());
        }

        if (Log.isDebugEnabled()) {
            Log.debug("Classpath = " + LazyList.array2List(
                    ((URLClassLoader) getWebAppContext().getClassLoader()).getURLs()));
        }
    } else {
        super.configureClassLoader();
    }
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:24,代码来源:JettyConfiguration.java

示例2: unlock

import org.mortbay.log.Log; //导入方法依赖的package包/类
public static void unlock(String lockId)
{
    Integer nestingLevel = nestings.get().get(lockId);
    if (nestingLevel == null || nestingLevel < 1)
        throw new AssertionError("Lock(" + lockId + ") nest level = " + nestingLevel + ", thread " + Thread.currentThread() + ": " + nestings.get());
    if (nestingLevel == 1)
    {
        ManagerUtil.commitLock(lockId);
        Log.debug("Lock({}) released by thread {}", lockId, Thread.currentThread().getName());
        nestings.get().remove(lockId);
    }
    else
    {
        nestings.get().put(lockId, nestingLevel - 1);
    }
    Log.debug("Lock({}) nestings {}", lockId, nestings.get());
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:18,代码来源:TerracottaSessionManager.java

示例3: complete

import org.mortbay.log.Log; //导入方法依赖的package包/类
/** 
 * Exit from session
 * 
 * If the session attributes changed then always write the session 
 * to the cloud.
 * 
 * If just the session access time changed, we don't always write out the
 * session, because the gigaspace will serialize the unchanged sesssion
 * attributes. To save on serialization overheads, we only write out the
 * session when only the access time has changed if the time at which we
 * last saved the session exceeds the chosen save interval.
 * 
 * @see org.mortbay.jetty.servlet.AbstractSessionManager.Session#complete()
 */
protected void complete()
{
    super.complete();
    try
    {
        if (_dirty || (_data._accessed - _data._lastSaved) >= (_savePeriodMs))
        {
            _data.setLastSaved(System.currentTimeMillis());
            willPassivate();   
            update(_data);
            didActivate();
            if (Log.isDebugEnabled()) Log.debug("Dirty="+_dirty+", accessed-saved="+_data._accessed +"-"+ _data._lastSaved+", savePeriodMs="+_savePeriodMs);
        }
    }
    catch (Exception e)
    {
        Log.warn("Problem persisting changed session data id="+getId(), e);
    }
    finally
    {
        _dirty=false;
    }
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:38,代码来源:GigaSessionManager.java

示例4: parseEvent

import org.mortbay.log.Log; //导入方法依赖的package包/类
private Map<String, Object> parseEvent(Event event) throws FlumeEventParserException {
    Map<String, Object> parsedEvent;
    if (event != null && !event.getHeaders().isEmpty()) {
        final Map<String, String> headers = event.getHeaders();
        Log.debug("Headers: {}", headers);
        parsedEvent = new HashMap<String, Object>();
        Log.debug("Header keys: {}", headers.keySet());
        for (String header : headers.keySet()) {
            if (filter.contains(header)) {
                if (headers.get(timestampField) != null && timestampField.equals(header)) {
                    parsedEvent.put(timestampField, headers.get(timestampField));
                    //TODO create timestamp field when timestampField is null?
                    //parsedEvent.put(timestampField, new DateTime(DateTimeZone.UTC).toString(dateTimeFormatter));
                    //parsedEvent.put("timestamp", new DateTime(DateTimeZone.UTC).getMillis());
                } else if (headers.get(header) != null) {
                    parsedEvent.put(header, headers.get(header));
                }
            }
        }
    } else {
        throw new FlumeEventParserException("Event is null or headers are empty");
    }

    return parsedEvent;
}
 
开发者ID:KonkerLabs,项目名称:flume-ng-druid-sink,代码行数:26,代码来源:FlumeEventParser.java

示例5: addSession

import org.mortbay.log.Log; //导入方法依赖的package包/类
public void addSession(HttpSession session)
{
    if (session == null)
        return;
    
    synchronized (_sessionIds)
    {
        if (session instanceof GigaSessionManager.Session)
        {
            String id = ((GigaSessionManager.Session)session).getClusterId();            
            try
            {
                Id theId = new Id(id);
                add(theId);
                _sessionIds.add(theId);
                if (Log.isDebugEnabled()) Log.debug("Added id "+id);
            }
            catch (Exception e)
            {
                Log.warn("Problem storing session id="+id, e);
            }
        }
        else
            throw new IllegalStateException ("Session is not a Gigaspaces session");
    }
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:27,代码来源:GigaSessionIdManager.java

示例6: removeSession

import org.mortbay.log.Log; //导入方法依赖的package包/类
public void removeSession (String id)
{

    if (id == null)
        return;
    
    synchronized (_sessionIds)
    {  
        if (Log.isDebugEnabled())
            Log.debug("Removing session id="+id);
        try
        {               
            Id theId = new Id(id);
            _sessionIds.remove(theId);
            delete(theId);
        }
        catch (Exception e)
        {
            Log.warn("Problem removing session id="+id, e);
        }
    }
    
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:24,代码来源:GigaSessionIdManager.java

示例7: removeSession

import org.mortbay.log.Log; //导入方法依赖的package包/类
protected void removeSession(String clusterId)
{
    /**
     * SESSION LOCKING
     * When this method is called, we already hold the session lock.
     * Either the scavenger acquired it, or the user invalidated
     * the existing session and thus {@link #enter(String)} was called.
     */

    // Remove locally cached session
    Session session = _sessions.remove(clusterId);
    Log.debug("Removed session {} with id {}", session, clusterId);

    // It may happen that one node removes its expired session data,
    // so that when this node does the same, the session data is already gone
    SessionData sessionData = _sessionDatas.remove(clusterId);
    Log.debug("Removed session data {} with id {}", sessionData, clusterId);

    // Remove the expiration entry used in scavenging
    _sessionExpirations.remove(clusterId);
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:22,代码来源:TerracottaSessionManager.java

示例8: reinit

import org.mortbay.log.Log; //导入方法依赖的package包/类
/**
 * reinit the compressor with the given configuration. It will reset the
 * compressor's compression level and compression strategy. Different from
 * <tt>ZlibCompressor</tt>, <tt>BuiltInZlibDeflater</tt> only support three
 * kind of compression strategy: FILTERED, HUFFMAN_ONLY and DEFAULT_STRATEGY.
 * It will use DEFAULT_STRATEGY as default if the configured compression
 * strategy is not supported.
 */
@Override
public void reinit(Configuration conf) {
  reset();
  if (conf == null) {
    return;
  }
  setLevel(ZlibFactory.getCompressionLevel(conf).compressionLevel());
  final ZlibCompressor.CompressionStrategy strategy =
    ZlibFactory.getCompressionStrategy(conf);
  try {
    setStrategy(strategy.compressionStrategy());
  } catch (IllegalArgumentException ill) {
    Log.warn(strategy + " not supported by BuiltInZlibDeflater.");
    setStrategy(DEFAULT_STRATEGY);
  }
  Log.debug("Reinit compressor with new compression configuration");
}
 
开发者ID:Seagate,项目名称:hadoop-on-lustre,代码行数:26,代码来源:BuiltInZlibDeflater.java

示例9: chmod

import org.mortbay.log.Log; //导入方法依赖的package包/类
/**
 * Change the permissions on a file / directory, recursively, if
 * needed.
 * @param filename name of the file whose permissions are to change
 * @param perm permission string
 * @param recursive true, if permissions should be changed recursively
 * @return the exit code from the command.
 * @throws IOException
 * @throws InterruptedException
 */
public static int chmod(String filename, String perm, boolean recursive)
                          throws IOException, InterruptedException {
  StringBuffer cmdBuf = new StringBuffer();
  cmdBuf.append("chmod ");
  if (recursive) {
    cmdBuf.append("-R ");
  }
  cmdBuf.append(perm).append(" ");
  cmdBuf.append(filename);
  String[] shellCmd = {"bash", "-c" ,cmdBuf.toString()};
  ShellCommandExecutor shExec = new ShellCommandExecutor(shellCmd);
  try {
    shExec.execute();
  }catch(IOException e) {
    if(Log.isDebugEnabled()) {
      Log.debug("Error while changing permission : " + filename 
          +" Exception: " + StringUtils.stringifyException(e));
    }
  }
  return shExec.getExitCode();
}
 
开发者ID:iVCE,项目名称:RDFS,代码行数:32,代码来源:FileUtil.java

示例10: Session

import org.mortbay.log.Log; //导入方法依赖的package包/类
/**
 * Session from a request.
 * 
 * @param request
 */
protected Session (HttpServletRequest request)
{
 
    super(request);   
    _data = new SessionData(_clusterId);
    _data.setMaxIdleMs(_dftMaxIdleSecs*1000);
    _data.setContextPath(_context.getContextPath());
    _data.setVirtualHost(getVirtualHost(_context));
    _data.setExpiryTime(_maxIdleMs < 0 ? 0 : (System.currentTimeMillis() + _maxIdleMs));
    _data.setCookieSet(0);
    if (_data.getAttributeMap()==null)
        newAttributeMap();
    _values=_data.getAttributeMap();
    if (Log.isDebugEnabled()) Log.debug("New Session from request, "+_data.toStringExtended());
}
 
开发者ID:ZarGate,项目名称:OpenbravoPOS,代码行数:21,代码来源:GigaSessionManager.java

示例11: findWebXml

import org.mortbay.log.Log; //导入方法依赖的package包/类
protected URL findWebXml() throws IOException {
    //if an explicit web.xml file has been set (eg for jetty:run) then use it
    if (webXmlFile != null && webXmlFile.exists()) {
        return webXmlFile.toURI().toURL();
    }

    //if we haven't overridden location of web.xml file, use the
    //standard way of finding it
    Log.debug("Looking for web.xml file in WEB-INF");
    return super.findWebXml();
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:12,代码来源:JettyConfiguration.java

示例12: lock

import org.mortbay.log.Log; //导入方法依赖的package包/类
public static void lock(String lockId)
{
    Integer nestingLevel = nestings.get().get(lockId);
    if (nestingLevel == null) nestingLevel = 0;
    if (nestingLevel < 0)
        throw new AssertionError("Lock(" + lockId + ") nest level = " + nestingLevel + ", thread " + Thread.currentThread() + ": " + nestings.get());
    if (nestingLevel == 0)
    {
        ManagerUtil.beginLock(lockId, Manager.LOCK_TYPE_WRITE);
        Log.debug("Lock({}) acquired by thread {}", lockId, Thread.currentThread().getName());
    }
    nestings.get().put(lockId, nestingLevel + 1);
    Log.debug("Lock({}) nestings {}", lockId, nestings.get());
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:15,代码来源:TerracottaSessionManager.java

示例13: setScavengePeriod

import org.mortbay.log.Log; //导入方法依赖的package包/类
public void setScavengePeriod(int seconds)
{
    if (seconds<=0)
        seconds=60;

    int old_period=_scavengePeriodMs;
    int period=seconds*1000;
  
    _scavengePeriodMs=period;
    
    //add a bit of variability into the scavenge time so that not all
    //contexts with the same scavenge time sync up
    int tenPercent = _scavengePeriodMs/10;
    if ((System.currentTimeMillis()%2) == 0)
        _scavengePeriodMs += tenPercent;
    
    if (Log.isDebugEnabled()) Log.debug("GigspacesSessionScavenger scavenging every "+_scavengePeriodMs+" ms");
    if (_timer!=null && (period!=old_period || _task==null))
    {
        synchronized (this)
        {
            if (_task!=null)
                _task.cancel();
            _task = new TimerTask()
            {
                public void run()
                {
                    scavenge();
                }   
            };
            _timer.schedule(_task,_scavengePeriodMs,_scavengePeriodMs);
        }
    }
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:35,代码来源:GigaSessionManager.java

示例14: exists

import org.mortbay.log.Log; //导入方法依赖的package包/类
protected boolean exists (Id id)
throws Exception
{
    Id idFromSpace = (Id)_space.readIfExists(id, getWaitMs());
    if (Log.isDebugEnabled()) Log.debug("Id="+id+(idFromSpace==null?"does not exist":"exists"));
    if (idFromSpace==null)
        return false;
    return true;
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:10,代码来源:GigaSessionIdManager.java

示例15: addSession

import org.mortbay.log.Log; //导入方法依赖的package包/类
protected void addSession(AbstractSessionManager.Session session)
{
    /**
     * SESSION LOCKING
     * When this method is called, we already hold the session lock.
     * See {@link #addSession(AbstractSessionManager.Session, boolean)}
     */
    String clusterId = getClusterId(session);
    Session tcSession = (Session)session;
    SessionData sessionData = tcSession.getSessionData();
    _sessionExpirations.put(clusterId, sessionData._expiration);
    _sessionDatas.put(clusterId, sessionData);
    _sessions.put(clusterId, tcSession);
    Log.debug("Added session {} with id {}", tcSession, clusterId);
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:16,代码来源:TerracottaSessionManager.java


注:本文中的org.mortbay.log.Log.debug方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。