本文整理了Java中ch.qos.logback.core.joran.action.Action
类的一些代码示例,展示了Action
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Action
类的具体详情如下:
包路径:ch.qos.logback.core.joran.action.Action
类名称:Action
[英]Most of the work for configuring logback is done by Actions.
Action methods are invoked as the XML file is parsed.
This class is largely inspired from the relevant class in the commons-digester project of the Apache Software Foundation.
[中]配置logback的大部分工作都是通过操作完成的。
解析XML文件时调用操作方法。
这个类很大程度上是由Apache软件基金会的公地消化器项目中的相关类启发而来的。
代码示例来源:origin: camunda/camunda-bpm-platform
void callBeginAction(List<Action> applicableActionList, String tagName,
Attributes atts) {
if (applicableActionList == null) {
return;
}
Iterator<Action> i = applicableActionList.iterator();
while (i.hasNext()) {
Action action = (Action) i.next();
// now let us invoke the action. We catch and report any eventual
// exceptions
try {
action.begin(interpretationContext, tagName, atts);
} catch (ActionException e) {
skip = elementPath.duplicate();
cai.addError("ActionException in Action for tag [" + tagName + "]", e);
} catch (RuntimeException e) {
skip = elementPath.duplicate();
cai.addError("RuntimeException in Action for tag [" + tagName + "]", e);
}
}
}
代码示例来源:origin: camunda/camunda-bpm-platform
private void callBodyAction(List<Action> applicableActionList, String body) {
if (applicableActionList == null) {
return;
}
Iterator<Action> i = applicableActionList.iterator();
while (i.hasNext()) {
Action action = i.next();
try {
action.body(interpretationContext, body);
} catch (ActionException ae) {
cai
.addError("Exception in end() methd for action [" + action + "]",
ae);
}
}
}
代码示例来源:origin: camunda/camunda-bpm-platform
private void callEndAction(List<Action> applicableActionList, String tagName) {
if (applicableActionList == null) {
return;
}
// logger.debug("About to call end actions on node: [" + localName + "]");
Iterator<Action> i = applicableActionList.iterator();
while (i.hasNext()) {
Action action = i.next();
// now let us invoke the end method of the action. We catch and report
// any eventual exceptions
try {
action.end(interpretationContext, tagName);
} catch (ActionException ae) {
// at this point endAction, there is no point in skipping children as
// they have been already processed
cai.addError("ActionException in Action for tag [" + tagName + "]", ae);
} catch (RuntimeException e) {
// no point in setting skip
cai.addError("RuntimeException in Action for tag [" + tagName + "]", e);
}
}
}
代码示例来源:origin: camunda/camunda-bpm-platform
protected String getLineColStr(InterpretationContext ic) {
return "line: " + getLineNumber(ic) + ", column: "
+ getColumnNumber(ic);
}
}
代码示例来源:origin: camunda/camunda-bpm-platform
/**
* Add a new rule, i.e. a pattern, action pair to the rule store. <p> Note
* that the added action's LoggerRepository will be set in the process.
*/
public void addRule(ElementSelector elementSelector, Action action) {
action.setContext(context);
List<Action> a4p = rules.get(elementSelector);
if (a4p == null) {
a4p = new ArrayList<Action>();
rules.put(elementSelector, a4p);
}
a4p.add(action);
}
代码示例来源:origin: tony19/logback-android
protected String getLineColStr(InterpretationContext ic) {
return "line: " + getLineNumber(ic) + ", column: "
+ getColumnNumber(ic);
}
}
代码示例来源:origin: tony19/logback-android
/**
* Add a new rule, i.e. a pattern, action pair to the rule store. <p> Note
* that the added action's LoggerRepository will be set in the process.
*/
public void addRule(ElementSelector elementSelector, Action action) {
action.setContext(context);
List<Action> a4p = rules.get(elementSelector);
if (a4p == null) {
a4p = new ArrayList<Action>();
rules.put(elementSelector, a4p);
}
a4p.add(action);
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/ch.qos.logback.core
protected String getLineColStr(InterpretationContext ic) {
return "line: " + getLineNumber(ic) + ", column: "
+ getColumnNumber(ic);
}
}
代码示例来源:origin: ch.qos.logback/core
/**
* Add a new rule, i.e. a pattern, action pair to the rule store. <p> Note
* that the added action's LoggerRepository will be set in the process.
*/
public void addRule(Pattern pattern, Action action) {
action.setContext(context);
List<Action> a4p = rules.get(pattern);
if (a4p == null) {
a4p = new ArrayList<Action>();
rules.put(pattern, a4p);
}
a4p.add(action);
}
代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded
private void callBodyAction(List<Action> applicableActionList, String body) {
if (applicableActionList == null) {
return;
}
Iterator<Action> i = applicableActionList.iterator();
while (i.hasNext()) {
Action action = i.next();
try {
action.body(interpretationContext, body);
} catch (ActionException ae) {
cai.addError("Exception in end() methd for action [" + action + "]", ae);
}
}
}
代码示例来源:origin: tony19/logback-android
private void callEndAction(List<Action> applicableActionList, String tagName) {
if (applicableActionList == null) {
return;
}
// logger.debug("About to call end actions on node: [" + localName + "]");
Iterator<Action> i = applicableActionList.iterator();
while (i.hasNext()) {
Action action = i.next();
// now let us invoke the end method of the action. We catch and report
// any eventual exceptions
try {
action.end(interpretationContext, tagName);
} catch (ActionException ae) {
// at this point endAction, there is no point in skipping children as
// they have been already processed
cai.addError("ActionException in Action for tag [" + tagName + "]", ae);
} catch (RuntimeException e) {
// no point in setting skip
cai.addError("RuntimeException in Action for tag [" + tagName + "]", e);
}
}
}
代码示例来源:origin: io.virtdata/virtdata-lib-realer
void callBeginAction(List<Action> applicableActionList, String tagName, Attributes atts) {
if (applicableActionList == null) {
return;
}
Iterator<Action> i = applicableActionList.iterator();
while (i.hasNext()) {
Action action = (Action) i.next();
// now let us invoke the action. We catch and report any eventual
// exceptions
try {
action.begin(interpretationContext, tagName, atts);
} catch (ActionException e) {
skip = elementPath.duplicate();
cai.addError("ActionException in Action for tag [" + tagName + "]", e);
} catch (RuntimeException e) {
skip = elementPath.duplicate();
cai.addError("RuntimeException in Action for tag [" + tagName + "]", e);
}
}
}
代码示例来源:origin: ch.qos.logback/core
protected String getLineColStr(InterpretationContext ic) {
return "line: " + getLineNumber(ic) + ", column: "
+ getColumnNumber(ic);
}
}
代码示例来源:origin: com.alibaba.citrus.tool/antx-autoexpand
/**
* Add a new rule, i.e. a pattern, action pair to the rule store. <p> Note
* that the added action's LoggerRepository will be set in the process.
*/
public void addRule(Pattern pattern, Action action) {
action.setContext(context);
List<Action> a4p = rules.get(pattern);
if (a4p == null) {
a4p = new ArrayList<Action>();
rules.put(pattern, a4p);
}
a4p.add(action);
}
代码示例来源:origin: io.virtdata/virtdata-lib-realer
private void callBodyAction(List<Action> applicableActionList, String body) {
if (applicableActionList == null) {
return;
}
Iterator<Action> i = applicableActionList.iterator();
while (i.hasNext()) {
Action action = i.next();
try {
action.body(interpretationContext, body);
} catch (ActionException ae) {
cai.addError("Exception in end() methd for action [" + action + "]", ae);
}
}
}
代码示例来源:origin: com.alibaba.citrus.tool/antx-autoexpand
private void callEndAction(List applicableActionList, String tagName) {
if (applicableActionList == null) {
return;
}
// logger.debug("About to call end actions on node: [" + localName + "]");
Iterator i = applicableActionList.iterator();
while (i.hasNext()) {
Action action = (Action) i.next();
// now let us invoke the end method of the action. We catch and report
// any eventual exceptions
try {
action.end(interpretationContext, tagName);
} catch (ActionException ae) {
// at this point endAction, there is no point in skipping children as
// they have been already processed
cai.addError("ActionException in Action for tag [" + tagName + "]", ae);
} catch (RuntimeException e) {
// no point in setting skip
cai.addError("RuntimeException in Action for tag [" + tagName + "]", e);
}
}
}
代码示例来源:origin: Nextdoor/bender
void callBeginAction(List<Action> applicableActionList, String tagName, Attributes atts) {
if (applicableActionList == null) {
return;
}
Iterator<Action> i = applicableActionList.iterator();
while (i.hasNext()) {
Action action = (Action) i.next();
// now let us invoke the action. We catch and report any eventual
// exceptions
try {
action.begin(interpretationContext, tagName, atts);
} catch (ActionException e) {
skip = elementPath.duplicate();
cai.addError("ActionException in Action for tag [" + tagName + "]", e);
} catch (RuntimeException e) {
skip = elementPath.duplicate();
cai.addError("RuntimeException in Action for tag [" + tagName + "]", e);
}
}
}
代码示例来源:origin: com.alibaba.citrus.tool/antx-autoexpand
protected String getLineColStr(InterpretationContext ec) {
String line = "line: " + getLineNumber(ec) + ", column: "
+ getColumnNumber(ec);
return line;
}
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/ch.qos.logback.core
/**
* Add a new rule, i.e. a pattern, action pair to the rule store. <p> Note
* that the added action's LoggerRepository will be set in the process.
*/
public void addRule(Pattern pattern, Action action) {
action.setContext(context);
List<Action> a4p = rules.get(pattern);
if (a4p == null) {
a4p = new ArrayList<Action>();
rules.put(pattern, a4p);
}
a4p.add(action);
}
代码示例来源:origin: Nextdoor/bender
private void callBodyAction(List<Action> applicableActionList, String body) {
if (applicableActionList == null) {
return;
}
Iterator<Action> i = applicableActionList.iterator();
while (i.hasNext()) {
Action action = i.next();
try {
action.body(interpretationContext, body);
} catch (ActionException ae) {
cai.addError("Exception in end() methd for action [" + action + "]", ae);
}
}
}
内容来源于网络,如有侵权,请联系作者删除!