本文整理了Java中org.opennms.netmgt.xml.event.Event.getLogmsg()
方法的一些代码示例,展示了Event.getLogmsg()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Event.getLogmsg()
方法的具体详情如下:
包路径:org.opennms.netmgt.xml.event.Event
类名称:Event
方法名:getLogmsg
[英]Returns the value of field 'logmsg'. The field 'logmsg' has the following description: The event logmsg
[中]返回字段“logmsg”的值。字段“logmsg”具有以下描述:事件logmsg
代码示例来源:origin: OpenNMS/opennms
@Override
public String getValue(String parm, String parsedParm, Event event, EventUtil eventUtil) {
return event.getLogmsg().getContent();
}
},
代码示例来源:origin: org.opennms.features.events/org.opennms.features.events.daemon
@Override
public String getValue(String parm, String parsedParm, Event event, EventUtil eventUtil) {
return event.getLogmsg().getContent();
}
},
代码示例来源:origin: OpenNMS/opennms
private void process(Header eventHeader, Event event, boolean synchronous) {
if (event.getLogmsg() != null && event.getLogmsg().getDest().equals("suppress")) {
LOG.debug("process: skip sending event {} to other daemons because is marked as suppress", event.getUei());
} else {
m_eventIpcBroadcaster.broadcastNow(event, synchronous);
}
}
代码示例来源:origin: org.opennms.features.events/org.opennms.features.events.daemon
private void process(Header eventHeader, Event event, boolean synchronous) {
if (event.getLogmsg() != null && event.getLogmsg().getDest().equals("suppress")) {
LOG.debug("process: skip sending event {} to other daemons because is marked as suppress", event.getUei());
} else {
m_eventIpcBroadcaster.broadcastNow(event, synchronous);
}
}
代码示例来源:origin: OpenNMS/opennms
/**
* <p>checkEventSanityAndDoWeProcess</p>
*
* @param event a {@link org.opennms.netmgt.xml.event.Event} object.
* @param logPrefix a {@link java.lang.String} object.
* @return a boolean.
*/
private static boolean checkEventSanityAndDoWeProcess(Event event, String logPrefix) {
Assert.notNull(event, "event argument must not be null");
/*
* Check value of <logmsg> attribute 'dest', if set to
* "donotpersist" or "suppress" then simply return, the UEI is not to be
* persisted to the database
*/
Assert.notNull(event.getLogmsg(), "event does not have a logmsg");
if (
LOG_MSG_DEST_DO_NOT_PERSIST.equalsIgnoreCase(event.getLogmsg().getDest()) ||
LOG_MSG_DEST_SUPRRESS.equalsIgnoreCase(event.getLogmsg().getDest())
) {
LOG.debug("{}: uei '{}' marked as '{}'; not processing event.", logPrefix, event.getUei(), event.getLogmsg().getDest());
return false;
}
return true;
}
代码示例来源:origin: org.opennms.features.events/org.opennms.features.events.daemon
/**
* <p>checkEventSanityAndDoWeProcess</p>
*
* @param event a {@link org.opennms.netmgt.xml.event.Event} object.
* @param logPrefix a {@link java.lang.String} object.
* @return a boolean.
*/
private static boolean checkEventSanityAndDoWeProcess(Event event, String logPrefix) {
Assert.notNull(event, "event argument must not be null");
/*
* Check value of <logmsg> attribute 'dest', if set to
* "donotpersist" or "suppress" then simply return, the UEI is not to be
* persisted to the database
*/
Assert.notNull(event.getLogmsg(), "event does not have a logmsg");
if (
LOG_MSG_DEST_DO_NOT_PERSIST.equalsIgnoreCase(event.getLogmsg().getDest()) ||
LOG_MSG_DEST_SUPRRESS.equalsIgnoreCase(event.getLogmsg().getDest())
) {
LOG.debug("{}: uei '{}' marked as '{}'; not processing event.", logPrefix, event.getUei(), event.getLogmsg().getDest());
return false;
}
return true;
}
代码示例来源:origin: OpenNMS/opennms
private void ensureLogmsg() {
if (m_event.getLogmsg() == null) {
m_event.setLogmsg(new Logmsg());
}
}
代码示例来源:origin: OpenNMS/opennms
/**
* <p>setLogDest</p>
*
* @param dest a {@link java.lang.String} object.
* @return a {@link org.opennms.netmgt.model.events.EventBuilder} object.
*/
public EventBuilder setLogDest(final String dest) {
ensureLogmsg();
m_event.getLogmsg().setDest(dest);
return this;
}
代码示例来源:origin: OpenNMS/opennms
/**
* <p>setLogMessage</p>
*
* @param content a {@link java.lang.String} object.
* @return a {@link org.opennms.netmgt.model.events.EventBuilder} object.
*/
public EventBuilder setLogMessage(final String content) {
ensureLogmsg();
m_event.getLogmsg().setContent(content);
return this;
}
代码示例来源:origin: org.opennms/opennms-alarmd
private static boolean checkEventSanityAndDoWeProcess(final Event event) {
if (event.getLogmsg() != null && LogDestType.DONOTPERSIST.toString().equalsIgnoreCase(event.getLogmsg().getDest())) {
if (LOG.isDebugEnabled()) {
LOG.debug("checkEventSanity: uei '{}' marked as '{}'; not processing event.", event.getUei(), LogDestType.DONOTPERSIST);
}
return false;
}
if (event.getAlarmData() == null) {
if (LOG.isDebugEnabled()) {
LOG.debug("checkEventSanity: uei '{}' has no alarm data; not processing event.", event.getUei());
}
return false;
}
if (event.getDbid() <= 0) {
throw new IllegalArgumentException("Incoming event has an illegal dbid (" + event.getDbid() + "), aborting");
}
return true;
}
代码示例来源:origin: OpenNMS/opennms
private static boolean checkEventSanityAndDoWeProcess(final Event event) {
if (event.getLogmsg() != null && LogDestType.DONOTPERSIST.toString().equalsIgnoreCase(event.getLogmsg().getDest())) {
if (LOG.isDebugEnabled()) {
LOG.debug("checkEventSanity: uei '{}' marked as '{}'; not processing event.", event.getUei(), LogDestType.DONOTPERSIST);
}
return false;
}
if (event.getAlarmData() == null) {
if (LOG.isDebugEnabled()) {
LOG.debug("checkEventSanity: uei '{}' has no alarm data; not processing event.", event.getUei());
}
return false;
}
if (event.getDbid() <= 0) {
throw new IllegalArgumentException("Incoming event has an illegal dbid (" + event.getDbid() + "), aborting");
}
return true;
}
代码示例来源:origin: OpenNMS/opennms
LOG.trace(" iface = {}", event.getInterface());
LOG.trace(" time = {}", event.getTime());
LOG.trace(" Msg = {}", event.getLogmsg().getContent());
LOG.trace(" Dst = {}", event.getLogmsg().getDest());
List<Parm> parms = (event.getParmCollection() == null ? null : event.getParmCollection());
if (parms != null) {
代码示例来源:origin: OpenNMS/opennms
if (event.getLogmsg() != null && event.getLogmsg().getDest().equalsIgnoreCase("donotpersist")) {
LOG.debug("discarding event {}, the event has been configured as 'doNotPersist'.", event.getUei());
return;
代码示例来源:origin: OpenNMS/opennms
e.getTticket() == null ? "" : e.getTticket().getContent(),
Integer.valueOf(e.getTticket() == null ? "0" : e.getTticket().getState()),
e.getLogmsg() == null? null : e.getLogmsg().getContent()
};
e.setDbid(eventId);
代码示例来源:origin: org.opennms.core.test-api/org.opennms.core.test-api.db
e.getTticket() == null ? "" : e.getTticket().getContent(),
Integer.valueOf(e.getTticket() == null ? "0" : e.getTticket().getState()),
e.getLogmsg() == null? null : e.getLogmsg().getContent()
};
e.setDbid(eventId);
代码示例来源:origin: OpenNMS/opennms
if (event.getLogmsg() != null) {
expandParms(event.getLogmsg(), event, decode);
代码示例来源:origin: org.opennms.features.events/org.opennms.features.events.daemon
if (event.getLogmsg() != null) {
expandParms(event.getLogmsg(), event, decode);
代码示例来源:origin: OpenNMS/opennms
if (event.getLogmsg() != null) {
builder.setLogMessage(event.getLogmsg().getContent());
代码示例来源:origin: org.opennms/opennms-dao-mock
oe.setIpAddr(event.getInterfaceAddress());
if (event.getLogmsg() != null) {
oe.setEventLogMsg(EventDatabaseConstants.format(event.getLogmsg().getContent(), 0));
final String logdest = event.getLogmsg().getDest();
if (logdest.equals("logndisplay")) {
代码示例来源:origin: org.opennms.features.kafka/org.opennms.features.kafka.producer
if (event.getLogmsg() != null) {
builder.setLogMessage(event.getLogmsg().getContent());
内容来源于网络,如有侵权,请联系作者删除!