Package org.apache.log4j

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


          expKeys.addAll(eventKeys.get(2).subList(0, 80 + offset));
          for(int i = 0; i < expKeys.size(); i++)
          {
            if (! consumer.getKeys().contains(expKeys.get(i)))
            {
              log.error(i + " Key :" + expKeys.get(i) + " missing !!");
                 throw new RuntimeException("Failed at "+ i);
            }
            else
              log.info(i + " Key :" + expKeys.get(i) + " present !!");
          }
View Full Code Here


        else{           
          model = (WeightingModel) Class.forName(name).asSubclass(WeightingModel.class).newInstance();
        }
       
      } catch(InvocationTargetException e) {
        logger.error("Recursive problem with weighting model named: "+name, e);
      } catch(Exception e) {
        logger.error("Problem with weighting model named: " + name, e);
      }
      cache.get(index).put(name, model);
    }
View Full Code Here

        }
       
      } catch(InvocationTargetException e) {
        logger.error("Recursive problem with weighting model named: "+name, e);
      } catch(Exception e) {
        logger.error("Problem with weighting model named: " + name, e);
      }
      cache.get(index).put(name, model);
    }
   
    return model;
View Full Code Here

        else{           
          model = (QueryExpansionModel) Class.forName(name).newInstance();
        }
       
      } catch(InvocationTargetException e) {
        logger.error("Recursive problem with weighting model named: "+name, e);
      } catch(Exception e) {
        logger.error("Problem with weighting model named: " + name, e);
      }
      cache.put(name, model);
View Full Code Here

        }
       
      } catch(InvocationTargetException e) {
        logger.error("Recursive problem with weighting model named: "+name, e);
      } catch(Exception e) {
        logger.error("Problem with weighting model named: " + name, e);
      }
      cache.put(name, model);

    }
   
View Full Code Here

   */
  public void logError(String message) {
    Logger logger = this.getLogger();
    String newMsg = this.enhanceMessage(message);
    countLines(newMsg);
    logger.error(newMsg);

  }

  /**
   * @param configurationProperties
View Full Code Here

   * @param message
   * @param ex
   */
  public void logError(String message, Exception ex) {
    Logger logger = this.getLogger();
    logger.error(message, ex);

  }

  /**
   * Log a warning mesasge.
View Full Code Here

                UnsafeDebugAppender kdbApp = new UnsafeDebugAppender(new PatternLayout(LAYOUT));
                kdbApp.setThreshold(Level.DEBUG);
                root.addAppender(kdbApp);
            }
        } catch (NameNotFoundException ex) {
            root.error("ConsoleManager not found", ex);
        }
    }

    /**
     * @see org.jnode.plugin.Plugin#stopPlugin()
View Full Code Here

        final Logger log = Logger.getLogger(Log4jTest.class);

        log.debug("This is a debug message");
        log.info("This is a info message");
        log.warn("This is a warn message");
        log.error("This is a error message");
        log.fatal("This is a fatal message");

    }
}
View Full Code Here

    } finally {
      if (insertStmt != null)
        try {
          insertStmt.close();
        } catch (SQLException e) {
          logger.error("failed to close insert statement");
        }
    }

  }
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.