Package railo.commons.io.log

Examples of railo.commons.io.log.Log


    //if(!super.hasContent()) return;
   
    DatasourceConnection dc = null;
    ConfigImpl ci = (ConfigImpl)config;
    DatasourceConnectionPool pool = ci.getDatasourceConnectionPool();
    Log log=((ConfigImpl)config).getScopeLogger();
    try {
      PageContext pc = ThreadLocalPageContext.get();// FUTURE change method interface
      DataSource ds;
      if(pc!=null) ds=((PageContextImpl)pc).getDataSource(datasourceName);
      else ds=config.getDataSource(datasourceName);
View Full Code Here


    ConfigImpl ci=(ConfigImpl) config;
    DatasourceConnection dc = null;
   
   
    DatasourceConnectionPool pool = ci.getDatasourceConnectionPool();
    Log log=((ConfigImpl)config).getScopeLogger();
    try {
      PageContext pc = ThreadLocalPageContext.get();// FUTURE change method interface
      DataSource ds;
      if(pc!=null) ds=((PageContextImpl)pc).getDataSource(datasourceName);
      else ds=config.getDataSource(datasourceName);
View Full Code Here

    DatasourceConnection dc=null;
   
    DatasourceConnectionPool pool = cwi.getDatasourceConnectionPool();
    try {
      dc=pool.getDatasourceConnection(null,dataSource,null,null);
      Log log=((ConfigImpl)config).getScopeLogger();
      SQLExecutor executor=SQLExecutionFactory.getInstance(dc);
      executor.clean(config, dc, type, engine,this, listener, log);
    }
      finally {
        if(dc!=null) pool.releaseDatasourceConnection(dc);
View Full Code Here

                if(pc.getStartTime()+timeout<System.currentTimeMillis()) {
                    terminate(pc);
                }
                // after 10 seconds downgrade priority of the thread
                else if(pc.getStartTime()+10000<System.currentTimeMillis() && pc.getThread().getPriority()!=Thread.MIN_PRIORITY) {
                    Log log = config.getRequestTimeoutLogger();
                    if(log!=null)log.warn("controller","downgrade priority of the a thread at "+getPath(pc));
                    try {
                      pc.getThread().setPriority(Thread.MIN_PRIORITY);
                    }
                    catch(Throwable t) {}
                }
View Full Code Here

            }
        }
  }
 
  public static void terminate(PageContext pc) {
    Log log = pc.getConfig().getRequestTimeoutLogger();
       
    String strLocks="";
    try{
      LockManager manager = pc.getConfig().getLockManager();
          String[] locks = manager.getOpenLockNames();
          if(!ArrayUtil.isEmpty(locks))
            strLocks=" open locks at this time ("+ListUtil.arrayToList(locks, ", ")+").";
          //LockManagerImpl.unlockAll(pc.getId());
    }
    catch(Throwable t){}
       
        if(log!=null)log.error("controller",
            "stop thread ("+pc.getId()+") because run into a timeout "+getPath(pc)+"."+strLocks);
        pc.getThread().stop(new RequestTimeoutException(pc,"request ("+getPath(pc)+":"+pc.getId()+") has run into a timeout ("+(pc.getRequestTimeout()/1000)+" seconds) and has been stopped."+strLocks));
       
  }
View Full Code Here

    /**
     * remove all unused scope objects
     */
    public void clearUnused() {
     
      Log log=getLog();
      try{
      // create cleaner engine for session/client scope
      if(session==null)session=new StorageScopeEngine(factory,log,new StorageScopeCleaner[]{
      new FileStorageScopeCleaner(Scope.SCOPE_SESSION, null)//new SessionEndListener())
      ,new DatasourceStorageScopeCleaner(Scope.SCOPE_SESSION, null)//new SessionEndListener())
View Full Code Here

    qry.addRow();
    qry.setAtEL("name", row, name);
    qry.setAtEL("level", row, LogUtil.toStringType(log.getLogLevel(), ""));
    qry.setAtEL("virtualpath", row, log.getSource());
    qry.setAtEL("class", row, log.getLog().getClass().getName());
        Log l = log.getLog();
        if(l instanceof LogResource){
          LogResource lr = (LogResource)l;
          qry.setAtEL("maxFile", row, Caster.toString(lr.getMaxFiles()));
          qry.setAtEL("maxFileSize", row, Caster.toString(lr.getMaxFileSize()));
          qry.setAtEL("path", row, lr.getResource().getAbsolutePath());
View Full Code Here

TOP

Related Classes of railo.commons.io.log.Log

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.