Package org.apache.log4j

Examples of org.apache.log4j.Logger.error()


        connection.setDoInput(true);
        connection.setDoOutput(true);
        connection.connect();
       
        if (connection.getResponseCode() != 200) {
          logger.error("Error calling performing HttpGet: " + connection.getResponseCode());
            throw new Exception("Error calling webservice: " + connection.getResponseCode());
        }
       
        int contentLength = connection.getContentLength();
        InputStream is = connection.getInputStream();
View Full Code Here


            if (count > 0) {
                logger.debug("Reading chunk: " + count);
            }
            totalread += is.read(response, totalread, contentLength - totalread);
            if (++count > 500) {
                logger.error("Aborting read after 500 tries");
                break;
            }
        }
        logger.debug(response);
        is.close();
View Full Code Here

        logger.debug(request);
        out.write(request.getBytes());
        out.close();
       
        if (connection.getResponseCode() != 200) {
          logger.error(request);
          logger.error("Error calling webservice: " + connection.getResponseCode());
            throw new Exception("Error calling webservice: " + connection.getResponseCode());
        }
       
        int contentLength = connection.getContentLength();
View Full Code Here

        out.write(request.getBytes());
        out.close();
       
        if (connection.getResponseCode() != 200) {
          logger.error(request);
          logger.error("Error calling webservice: " + connection.getResponseCode());
            throw new Exception("Error calling webservice: " + connection.getResponseCode());
        }
       
        int contentLength = connection.getContentLength();
        InputStream is = connection.getInputStream();
View Full Code Here

            if (count > 0) {
                logger.debug("Reading chunk: " + count);
            }
            totalread += is.read(response, totalread, contentLength - totalread);
            if (++count > 500) {
                logger.error("Aborting read after 500 tries");
                break;
            }
        }
        logger.debug(response);
        is.close();
View Full Code Here

        message.append(conditions).append(',');
        message.append(alertURL);

        switch (alert.getAlertDefinition().getPriority()){
            case HIGH:
                logger.error(message);
                break;
            case MEDIUM:
                logger.warn(message);
                break;
            case LOW:
View Full Code Here

        System.out.println("totalMemory = " + runtime.totalMemory());

        BasicConfigurator.configure();
        Logger logger = Logger.getLogger(MemorySettingsTest.class);

        logger.error("maxMemory = " + runtime.maxMemory());

        logger.error("freeMemory = " + runtime.freeMemory());

        logger.error("totalMemory = " + runtime.totalMemory());
    }
View Full Code Here

        BasicConfigurator.configure();
        Logger logger = Logger.getLogger(MemorySettingsTest.class);

        logger.error("maxMemory = " + runtime.maxMemory());

        logger.error("freeMemory = " + runtime.freeMemory());

        logger.error("totalMemory = " + runtime.totalMemory());
    }
}
View Full Code Here

        logger.error("maxMemory = " + runtime.maxMemory());

        logger.error("freeMemory = " + runtime.freeMemory());

        logger.error("totalMemory = " + runtime.totalMemory());
    }
}
View Full Code Here

      @Override
      public void lostLock(final LockLossReason reason) {
        try {
          tch.halt(Tracer.traceInfo(), null, null);
        } catch (Exception ex) {
          log.error(ex, ex);
          System.exit(1);
        }
      }
     
      @Override
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.