org.miloss.fgsms.common.Logger.log()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(7.7k)|赞(0)|评价(0)|浏览(275)

本文整理了Java中org.miloss.fgsms.common.Logger.log()方法的一些代码示例,展示了Logger.log()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.log()方法的具体详情如下:
包路径:org.miloss.fgsms.common.Logger
类名称:Logger
方法名:log

Logger.log介绍

暂无

代码示例

代码示例来源:origin: org.mil-oss/fgsms-stats

  1. private void print(StatisticsContainer s) {
  2. log.log(Level.DEBUG, s.timeperiod + " " + s.uri + " " + s.action + " " + s.success + " " + s.faults + " "
  3. + s.averageresponsetime + " " + s.max_request_size + " " + s.max_response_size + " "
  4. + s.max_responsetime + " " + s.mtbf + " " + s.availibity);
  5. }

代码示例来源:origin: org.mil-oss/fgsms-ui-common

  1. public StatusHelper(String username, String password, org.miloss.fgsms.common.Constants.AuthMode mode, String keystore, String keystorepassword, String truststore, String truststorepassword) {
  2. try {
  3. this.username = username;
  4. this.password = password;
  5. this.mode = mode;
  6. } catch (Exception ex) {
  7. log.log(Level.WARN, "error initializing ssl sockets ", ex);
  8. }
  9. }
  10. private static final Logger log = LogHelper.getLog();

代码示例来源:origin: org.mil-oss/fgsms-common

  1. public static void safeClose(ResultSet con) {
  2. if (con != null) {
  3. try {
  4. con.close();
  5. } catch (Throwable ex) {
  6. log.log(Level.INFO, null, ex);
  7. }
  8. }
  9. }

代码示例来源:origin: org.mil-oss/fgsms-common

  1. public static void safeClose(PreparedStatement con) {
  2. if (con != null) {
  3. try {
  4. con.close();
  5. } catch (Throwable ex) {
  6. log.log(Level.INFO, null, ex);
  7. }
  8. }
  9. }
  10. }

代码示例来源:origin: org.mil-oss/fgsms-common

  1. public static void safeClose(Connection con) {
  2. if (con != null) {
  3. try {
  4. con.close();
  5. } catch (Throwable ex) {
  6. log.log(Level.INFO, null, ex);
  7. }
  8. }
  9. }

代码示例来源:origin: org.mil-oss/fgsms-agentcore

  1. public static void stop(String[] args) {
  2. if (t != null && t.isAlive() && instance != null) {
  3. instance.running = false;
  4. try {
  5. t.join();
  6. } catch (InterruptedException ex) {
  7. log.log(Level.ERROR, null, ex);
  8. }
  9. }
  10. }
  11. static Logger log = Logger.getLogger("fgsms.PersistentStorageAgent");

代码示例来源:origin: org.mil-oss/fgsms-discovery-dns

  1. @Override
  2. public void LoadConfig(Properties p) {
  3. try {
  4. DNSenabled = Boolean.parseBoolean(p.getProperty("discovery.dns.enabled").trim());
  5. } catch (Exception ex) {
  6. DNSenabled = false;
  7. log.log(Level.WARN, null, ex);
  8. }
  9. }

代码示例来源:origin: org.mil-oss/fgsms-stats

  1. private void printPeriods(List<Long> periods) {
  2. String s = "";
  3. for (int i = 0; i < periods.size(); i++) {
  4. s += periods.get(i) + " ";
  5. }
  6. log.log(Level.DEBUG, "calculating status using the following time periods " + s.trim());
  7. }

代码示例来源:origin: org.mil-oss/fgsms-stats

  1. private void printPeriods(List<Long> periods) {
  2. String s = "";
  3. for (int i = 0; i < periods.size(); i++) {
  4. s += periods.get(i) + " ";
  5. }
  6. log.log(Level.DEBUG, "calculating status using the following time periods " + s.trim());
  7. }

代码示例来源:origin: org.mil-oss/fgsms-sla-processor

  1. /**
  2. * Strips off the xml declaration
  3. *
  4. * @param xmlalert
  5. * @return
  6. */
  7. public static String StripXmlHeader(String xmlalert) {
  8. if (xmlalert.startsWith("<?xml")) {
  9. int trimat = xmlalert.indexOf("?>", 0);
  10. xmlalert = xmlalert.substring(trimat + 2);
  11. log.log(Level.DEBUG, "XML header trimmed " + xmlalert);
  12. }
  13. return xmlalert;
  14. }

代码示例来源:origin: org.mil-oss/fgsms-agentcore

  1. private static void WriteAllText(String filename, String text) {
  2. try {
  3. File f = new File(filename);
  4. log.log(Level.INFO, "WriteAllText Current Dir = " + f.getName() + f.getAbsolutePath());
  5. BufferedWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(filename), Constants.CHARSET));
  6. out.write(text);
  7. out.close();
  8. } catch (Exception e) {
  9. log.log(Level.INFO, filename + " WriteAllText, ", e);
  10. }
  11. }
  12. List<IEndpointDiscovery> endpointproviders = null;

代码示例来源:origin: org.mil-oss/fgsms-ui-common

  1. public String generateLink(Object dataset, int series, Object category) {
  2. try {
  3. LogHelper.getLog().log(Level.ERROR, "fgsmsWeb generateLinkSet");
  4. String s = (String) category;
  5. return "TransactionLogViewer.jsp?url=" + java.net.URLEncoder.encode(s, "UTF-8");
  6. } /* public String generateLink(Object dataset, int series, Object category) {
  7. throw new UnsupportedOperationException("Not supported yet.");
  8. }*/ catch (UnsupportedEncodingException ex) {
  9. Logger.getLogger(PerformanceViewerAvgResTime.class.getName()).log(Level.ERROR, null, ex);
  10. }
  11. return "";
  12. }

代码示例来源:origin: org.mil-oss/fgsms-ui-common

  1. public String generateLink(Object dataset, int series, Object category) {
  2. try {
  3. LogHelper.getLog().log(Level.ERROR, "fgsmsWeb generateLinkSet");
  4. String s = (String) category;
  5. return "TransactionLogViewer.jsp?url=" + java.net.URLEncoder.encode(s, "UTF-8");
  6. } /* public String generateLink(Object dataset, int series, Object category) {
  7. throw new UnsupportedOperationException("Not supported yet.");
  8. }*/ catch (UnsupportedEncodingException ex) {
  9. LogHelper.getLog().log(Level.ERROR, null, ex);
  10. }
  11. return "";
  12. }
  13. }

代码示例来源:origin: org.mil-oss/fgsms-dependency-scanner

  1. private void RecordDependency(String url, String action, String url0, String action0, Connection con) {
  2. PreparedStatement cmd=null;
  3. try {
  4. cmd = con.prepareStatement("INSERT INTO dependencies(sourceurl, sourcesoapaction, destintationurl, destinationsoapaction) VALUES (?, ?, ?, ?);");
  5. cmd.setString(1, url);
  6. cmd.setString(2, action);
  7. cmd.setString(3, url0);
  8. cmd.setString(4, action0);
  9. cmd.executeUpdate();
  10. } catch (Exception ex) {
  11. log.log(Level.ERROR, null, ex);
  12. } finally {
  13. DBUtils.safeClose(cmd);
  14. }
  15. }

代码示例来源:origin: org.mil-oss/fgsms-ui-common

  1. public static String ExportServicePolicy(ServicePolicy pol) {
  2. try {
  3. JAXBContext jc = Utility.getSerializationContext();
  4. Marshaller m = jc.createMarshaller();
  5. StringWriter sw = new StringWriter();
  6. // org.miloss.fgsms.services.interfaces.policyconfiguration.ObjectFactory pcsfac = new org.miloss.fgsms.services.interfaces.policyconfiguration.ObjectFactory ();
  7. m.marshal((pol), sw);
  8. String s = sw.toString();
  9. return s;
  10. } catch (Exception ex) {
  11. Logger.getLogger(Helper.class).log(Level.ERROR, null, ex);
  12. }
  13. return null;
  14. }

代码示例来源:origin: org.mil-oss/fgsms-sla-processor

  1. static synchronized void EnqueueAlert(AlertContainer alertContainer) {
  2. queue.add(alertContainer);
  3. log.log(Level.DEBUG, "Enqueue alert " + alertContainer.getSLAID());
  4. run();
  5. }

代码示例来源:origin: org.mil-oss/fgsms-ui-common

  1. public String generateToolTip(CategoryDataset data, int series, int item) {
  2. LogHelper.getLog().log(Level.ERROR, "fgsmsWeb generateToolTip " + series + " " + item);
  3. return "TransactionLogViewer.jsp?url=" + data.getValue(series, item);
  4. }
  5. /*

代码示例来源:origin: org.mil-oss/fgsms-automated-reporting-service

  1. private SecurityWrapper getCurrentOperatingClassificationLevel() {
  2. try {
  3. SecurityWrapper t = getGlobalPolicyFromDB().getClassification();
  4. log.log(Level.INFO, "PCS, current security classification is " + Utility.ICMClassificationToString(t.getClassification()) + " " + t.getCaveats());
  5. return t;
  6. } catch (Exception ex) {
  7. log.log(Level.ERROR, "Unable to determine current classification level. Is the database available?", ex);
  8. }
  9. throw new IllegalAccessError();
  10. }

代码示例来源:origin: org.mil-oss/fgsms-agentcore

  1. public DefaultMessageProcessor() {
  2. //TODO consider putting a maximum cap on the thread pool, may be 4 at the most
  3. try {
  4. cfg = new ConfigLoader();
  5. } catch (ConfigurationException ex) {
  6. log.fatal("Error loading config file!", ex);
  7. lasterror = ex.getMessage();
  8. System.err.println("Error loading config file!");
  9. ex.printStackTrace();
  10. log.log(Level.FATAL, "Unable to load configuration, messages will not be transmitted", ex);
  11. deadMessageInterval = 10000;
  12. isDependencyInjectionEnabled = false;
  13. }
  14. }

代码示例来源:origin: org.mil-oss/fgsms-ui-common

  1. public static String GetStatus(OpStatusService svc, String callbackUrl, SecurityWrapper c) {
  2. GetOperatingStatusRequestMessage req = new GetOperatingStatusRequestMessage();
  3. req.setClassification(c);
  4. BindingProvider bp = (BindingProvider) svc;
  5. bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, callbackUrl);
  6. GetOperatingStatusResponseMessage operatingStatus;
  7. try {
  8. operatingStatus = svc.getOperatingStatus(req);
  9. return OpStatHelper.toHtmlFormatedString(operatingStatus, callbackUrl);
  10. } catch (Exception ex) {
  11. LogHelper.getLog().log(Level.WARN, null, ex);
  12. return ex.getMessage();
  13. }
  14. }

相关文章