本文整理了Java中org.miloss.fgsms.common.Logger.log()
方法的一些代码示例,展示了Logger.log()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.log()
方法的具体详情如下:
包路径:org.miloss.fgsms.common.Logger
类名称:Logger
方法名:log
暂无
代码示例来源:origin: org.mil-oss/fgsms-stats
private void print(StatisticsContainer s) {
log.log(Level.DEBUG, s.timeperiod + " " + s.uri + " " + s.action + " " + s.success + " " + s.faults + " "
+ s.averageresponsetime + " " + s.max_request_size + " " + s.max_response_size + " "
+ s.max_responsetime + " " + s.mtbf + " " + s.availibity);
}
代码示例来源:origin: org.mil-oss/fgsms-ui-common
public StatusHelper(String username, String password, org.miloss.fgsms.common.Constants.AuthMode mode, String keystore, String keystorepassword, String truststore, String truststorepassword) {
try {
this.username = username;
this.password = password;
this.mode = mode;
} catch (Exception ex) {
log.log(Level.WARN, "error initializing ssl sockets ", ex);
}
}
private static final Logger log = LogHelper.getLog();
代码示例来源:origin: org.mil-oss/fgsms-common
public static void safeClose(ResultSet con) {
if (con != null) {
try {
con.close();
} catch (Throwable ex) {
log.log(Level.INFO, null, ex);
}
}
}
代码示例来源:origin: org.mil-oss/fgsms-common
public static void safeClose(PreparedStatement con) {
if (con != null) {
try {
con.close();
} catch (Throwable ex) {
log.log(Level.INFO, null, ex);
}
}
}
}
代码示例来源:origin: org.mil-oss/fgsms-common
public static void safeClose(Connection con) {
if (con != null) {
try {
con.close();
} catch (Throwable ex) {
log.log(Level.INFO, null, ex);
}
}
}
代码示例来源:origin: org.mil-oss/fgsms-agentcore
public static void stop(String[] args) {
if (t != null && t.isAlive() && instance != null) {
instance.running = false;
try {
t.join();
} catch (InterruptedException ex) {
log.log(Level.ERROR, null, ex);
}
}
}
static Logger log = Logger.getLogger("fgsms.PersistentStorageAgent");
代码示例来源:origin: org.mil-oss/fgsms-discovery-dns
@Override
public void LoadConfig(Properties p) {
try {
DNSenabled = Boolean.parseBoolean(p.getProperty("discovery.dns.enabled").trim());
} catch (Exception ex) {
DNSenabled = false;
log.log(Level.WARN, null, ex);
}
}
代码示例来源:origin: org.mil-oss/fgsms-stats
private void printPeriods(List<Long> periods) {
String s = "";
for (int i = 0; i < periods.size(); i++) {
s += periods.get(i) + " ";
}
log.log(Level.DEBUG, "calculating status using the following time periods " + s.trim());
}
代码示例来源:origin: org.mil-oss/fgsms-stats
private void printPeriods(List<Long> periods) {
String s = "";
for (int i = 0; i < periods.size(); i++) {
s += periods.get(i) + " ";
}
log.log(Level.DEBUG, "calculating status using the following time periods " + s.trim());
}
代码示例来源:origin: org.mil-oss/fgsms-sla-processor
/**
* Strips off the xml declaration
*
* @param xmlalert
* @return
*/
public static String StripXmlHeader(String xmlalert) {
if (xmlalert.startsWith("<?xml")) {
int trimat = xmlalert.indexOf("?>", 0);
xmlalert = xmlalert.substring(trimat + 2);
log.log(Level.DEBUG, "XML header trimmed " + xmlalert);
}
return xmlalert;
}
代码示例来源:origin: org.mil-oss/fgsms-agentcore
private static void WriteAllText(String filename, String text) {
try {
File f = new File(filename);
log.log(Level.INFO, "WriteAllText Current Dir = " + f.getName() + f.getAbsolutePath());
BufferedWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(filename), Constants.CHARSET));
out.write(text);
out.close();
} catch (Exception e) {
log.log(Level.INFO, filename + " WriteAllText, ", e);
}
}
List<IEndpointDiscovery> endpointproviders = null;
代码示例来源:origin: org.mil-oss/fgsms-ui-common
public String generateLink(Object dataset, int series, Object category) {
try {
LogHelper.getLog().log(Level.ERROR, "fgsmsWeb generateLinkSet");
String s = (String) category;
return "TransactionLogViewer.jsp?url=" + java.net.URLEncoder.encode(s, "UTF-8");
} /* public String generateLink(Object dataset, int series, Object category) {
throw new UnsupportedOperationException("Not supported yet.");
}*/ catch (UnsupportedEncodingException ex) {
Logger.getLogger(PerformanceViewerAvgResTime.class.getName()).log(Level.ERROR, null, ex);
}
return "";
}
代码示例来源:origin: org.mil-oss/fgsms-ui-common
public String generateLink(Object dataset, int series, Object category) {
try {
LogHelper.getLog().log(Level.ERROR, "fgsmsWeb generateLinkSet");
String s = (String) category;
return "TransactionLogViewer.jsp?url=" + java.net.URLEncoder.encode(s, "UTF-8");
} /* public String generateLink(Object dataset, int series, Object category) {
throw new UnsupportedOperationException("Not supported yet.");
}*/ catch (UnsupportedEncodingException ex) {
LogHelper.getLog().log(Level.ERROR, null, ex);
}
return "";
}
}
代码示例来源:origin: org.mil-oss/fgsms-dependency-scanner
private void RecordDependency(String url, String action, String url0, String action0, Connection con) {
PreparedStatement cmd=null;
try {
cmd = con.prepareStatement("INSERT INTO dependencies(sourceurl, sourcesoapaction, destintationurl, destinationsoapaction) VALUES (?, ?, ?, ?);");
cmd.setString(1, url);
cmd.setString(2, action);
cmd.setString(3, url0);
cmd.setString(4, action0);
cmd.executeUpdate();
} catch (Exception ex) {
log.log(Level.ERROR, null, ex);
} finally {
DBUtils.safeClose(cmd);
}
}
代码示例来源:origin: org.mil-oss/fgsms-ui-common
public static String ExportServicePolicy(ServicePolicy pol) {
try {
JAXBContext jc = Utility.getSerializationContext();
Marshaller m = jc.createMarshaller();
StringWriter sw = new StringWriter();
// org.miloss.fgsms.services.interfaces.policyconfiguration.ObjectFactory pcsfac = new org.miloss.fgsms.services.interfaces.policyconfiguration.ObjectFactory ();
m.marshal((pol), sw);
String s = sw.toString();
return s;
} catch (Exception ex) {
Logger.getLogger(Helper.class).log(Level.ERROR, null, ex);
}
return null;
}
代码示例来源:origin: org.mil-oss/fgsms-sla-processor
static synchronized void EnqueueAlert(AlertContainer alertContainer) {
queue.add(alertContainer);
log.log(Level.DEBUG, "Enqueue alert " + alertContainer.getSLAID());
run();
}
代码示例来源:origin: org.mil-oss/fgsms-ui-common
public String generateToolTip(CategoryDataset data, int series, int item) {
LogHelper.getLog().log(Level.ERROR, "fgsmsWeb generateToolTip " + series + " " + item);
return "TransactionLogViewer.jsp?url=" + data.getValue(series, item);
}
/*
代码示例来源:origin: org.mil-oss/fgsms-automated-reporting-service
private SecurityWrapper getCurrentOperatingClassificationLevel() {
try {
SecurityWrapper t = getGlobalPolicyFromDB().getClassification();
log.log(Level.INFO, "PCS, current security classification is " + Utility.ICMClassificationToString(t.getClassification()) + " " + t.getCaveats());
return t;
} catch (Exception ex) {
log.log(Level.ERROR, "Unable to determine current classification level. Is the database available?", ex);
}
throw new IllegalAccessError();
}
代码示例来源:origin: org.mil-oss/fgsms-agentcore
public DefaultMessageProcessor() {
//TODO consider putting a maximum cap on the thread pool, may be 4 at the most
try {
cfg = new ConfigLoader();
} catch (ConfigurationException ex) {
log.fatal("Error loading config file!", ex);
lasterror = ex.getMessage();
System.err.println("Error loading config file!");
ex.printStackTrace();
log.log(Level.FATAL, "Unable to load configuration, messages will not be transmitted", ex);
deadMessageInterval = 10000;
isDependencyInjectionEnabled = false;
}
}
代码示例来源:origin: org.mil-oss/fgsms-ui-common
public static String GetStatus(OpStatusService svc, String callbackUrl, SecurityWrapper c) {
GetOperatingStatusRequestMessage req = new GetOperatingStatusRequestMessage();
req.setClassification(c);
BindingProvider bp = (BindingProvider) svc;
bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, callbackUrl);
GetOperatingStatusResponseMessage operatingStatus;
try {
operatingStatus = svc.getOperatingStatus(req);
return OpStatHelper.toHtmlFormatedString(operatingStatus, callbackUrl);
} catch (Exception ex) {
LogHelper.getLog().log(Level.WARN, null, ex);
return ex.getMessage();
}
}
内容来源于网络,如有侵权,请联系作者删除!