Package pt.opensoft.logging

Examples of pt.opensoft.logging.Logger.push()


    String resourceName = getResourceName();
    long resourceTimeout = parameters.getLongValue("resource." + resourceName + ".resourceTimeout");
    resource = resourceManager.get(resourceName, resourceTimeout);

    Logger resourceLogger = actionWrapper.getLogger().getWrapper();
    resourceLogger.push(resourceName + "|" + resource.getId());

    actionWrapper.getLogger().push(resourceName + "|" + resource.getId());
    mustPop = true;

    afectActionWithResource(resource, resourceLogger, actionWrapper);
View Full Code Here


    // Obter o entityManager
    entityManager = JPAUtil.getEntityManager(persistenceUnitId);

    // Preparar o log com informa��o do entityManager
    Logger resourceLogger = actionWrapper.getLogger().getWrapper();
    resourceLogger.push(persistenceUnitId);

    actionWrapper.getLogger().push(persistenceUnitId);
    mustPop = true;

    afectActionWithResource(entityManager, resourceLogger, actionWrapper, debug);
View Full Code Here

      String resourceName = getResourceName();
    long resourceTimeout = getResourceTimeout();

    resource = resourceManager.get(resourceName, resourceTimeout);

    resourceLogger.push(resourceName + "|" + resource.getId());

    actionWrapper.getLogger().push(resourceName + "|" + resource.getId());

    mustPop = true;
View Full Code Here

    Timer timer = new Timer();
    timer.start();
    ResultSet results = null;
    Exception ex = null;
    Logger logger = _dbc.getLogger();
    logger.push("query");
    try {
      results = ((CallableStatement) _stmt).executeQuery();
    } catch (SQLException e) {
      ex = e;
      throw e;
View Full Code Here

    } catch (SQLException e) {
      ex = e;
      throw e;
    } finally {
      boolean tooLong = (_dbc.getThreshold() > 0 && timer.ellapsed() > _dbc.getThreshold());
      if (tooLong) logger.push("too long");
      if (ex != null) {
        logger.error(timer.ellapsed(), getSQLString() + " -> " + ex.getMessage());
      } else if (tooLong) {
        logger.warning(timer.ellapsed(), getSQLString());
      } else {
View Full Code Here

    if(_doQueryTimeout)
    _stmt.setQueryTimeout(_queryTimeout);
    int count = 0;
    Exception ex = null;
    Logger logger = _dbc.getLogger();
    logger.push("update");
    try {
      count = ((CallableStatement) _stmt).executeUpdate();
    } catch (SQLException e) {
      ex = e;
      throw e;
View Full Code Here

    } catch (SQLException e) {
      ex = e;
      throw e;
    } finally {
            _dbc.setDbChanged(true);
            logger.push(count + " ROWS");
      boolean tooLong = (_dbc.getThreshold() > 0 && timer.ellapsed() > _dbc.getThreshold());
      if (ex != null) {
        logger.error(timer.ellapsed(), getSQLString() + " -> " + ex.getMessage());
      } else if (tooLong) {
        logger.warning(timer.ellapsed(), getSQLString());
View Full Code Here

    Timer timer = new Timer();
    timer.start();
    boolean result = false;
    Exception ex = null;
    Logger logger = _dbc.getLogger();
    logger.push("execute");
    try {
      result = ((CallableStatement) _stmt).execute();
        } catch (SQLException e) {
      ex = e;
      throw e;
View Full Code Here

        } catch (SQLException e) {
      ex = e;
      throw e;
    } finally {
            _dbc.setDbChanged(true);
      logger.push(String.valueOf(result));
      boolean tooLong = (_dbc.getThreshold() > 0 && timer.ellapsed() > _dbc.getThreshold());
            if (tooLong) logger.push("too long");
      if (ex != null) {
        logger.error(timer.ellapsed(), getSQLString() + " -> " + ex.getMessage());
      } else if (tooLong) {
View Full Code Here

      throw e;
    } finally {
            _dbc.setDbChanged(true);
      logger.push(String.valueOf(result));
      boolean tooLong = (_dbc.getThreshold() > 0 && timer.ellapsed() > _dbc.getThreshold());
            if (tooLong) logger.push("too long");
      if (ex != null) {
        logger.error(timer.ellapsed(), getSQLString() + " -> " + ex.getMessage());
      } else if (tooLong) {
        logger.warning(timer.ellapsed(), getSQLString());
      } else {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.