本文整理了Java中ch.qos.logback.core.html.HTMLLayoutBase
类的一些代码示例,展示了HTMLLayoutBase
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HTMLLayoutBase
类的具体详情如下:
包路径:ch.qos.logback.core.html.HTMLLayoutBase
类名称:HTMLLayoutBase
[英]This class is a base class for HTMLLayout classes part of other logback modules such as logback-classic and logback-access.
[中]
代码示例来源:origin: ch.qos.logback/logback-classic
@Override
protected String computeConverterName(Converter c) {
if (c instanceof MDCConverter) {
MDCConverter mc = (MDCConverter) c;
String key = mc.getFirstOption();
if (key != null) {
return key;
} else {
return "MDC";
}
} else {
return super.computeConverterName(c);
}
}
}
代码示例来源:origin: camunda/camunda-bpm-platform
protected void startNewTableIfLimitReached(StringBuilder sbuf) {
if (this.counter >= CoreConstants.TABLE_ROW_LIMIT) {
counter = 0;
sbuf.append("</table>");
sbuf.append(LINE_SEPARATOR);
sbuf.append("<p></p>");
sbuf.append("<table cellspacing=\"0\">");
sbuf.append(LINE_SEPARATOR);
buildHeaderRowForTable(sbuf);
}
}
代码示例来源:origin: camunda/camunda-bpm-platform
/**
* Returns a map where the default converter map is merged with the map
* contained in the context.
*/
public Map<String, String> getEffectiveConverterMap() {
Map<String, String> effectiveMap = new HashMap<String, String>();
// add the least specific map fist
Map<String, String> defaultMap = getDefaultConverterMap();
if (defaultMap != null) {
effectiveMap.putAll(defaultMap);
}
// contextMap is more specific than the default map
Context context = getContext();
if (context != null) {
@SuppressWarnings("unchecked")
Map<String, String> contextMap = (Map<String, String>) context
.getObject(CoreConstants.PATTERN_RULE_REGISTRY);
if (contextMap != null) {
effectiveMap.putAll(contextMap);
}
}
return effectiveMap;
}
代码示例来源:origin: camunda/camunda-bpm-platform
/**
* Parses the pattern and creates the Converter linked list.
*/
@Override
public void start() {
int errorCount = 0;
try {
Parser<E> p = new Parser<E>(pattern);
p.setContext(getContext());
Node t = p.parse();
this.head = p.compile(t, getEffectiveConverterMap());
ConverterUtil.startConverters(this.head);
} catch (ScanException ex) {
addError("Incorrect pattern found", ex);
errorCount++;
}
if (errorCount == 0) {
super.started = true;
}
}
代码示例来源:origin: ch.qos.logback/logback-classic
@Override
public void start() {
int errorCount = 0;
if (throwableRenderer == null) {
addError("ThrowableRender cannot be null.");
errorCount++;
}
if (errorCount == 0) {
super.start();
}
}
代码示例来源:origin: tony19/logback-android
/**
* Parses the pattern and creates the Converter linked list.
*/
@Override
public void start() {
int errorCount = 0;
try {
Parser<E> p = new Parser<E>(pattern);
p.setContext(getContext());
Node t = p.parse();
this.head = p.compile(t, getEffectiveConverterMap());
ConverterUtil.startConverters(this.head);
} catch (ScanException ex) {
addError("Incorrect pattern found", ex);
errorCount++;
}
if (errorCount == 0) {
super.started = true;
}
}
代码示例来源:origin: camunda/camunda-bpm-platform
@Override
public void start() {
int errorCount = 0;
if (throwableRenderer == null) {
addError("ThrowableRender cannot be null.");
errorCount++;
}
if (errorCount == 0) {
super.start();
}
}
代码示例来源:origin: com.alibaba.citrus.tool/antx-autoexpand
/**
* Parses the pattern and creates the Converter linked list.
*/
@Override
public void start() {
int errorCount = 0;
try {
Parser<E> p = new Parser<E>(pattern);
p.setContext(getContext());
Node t = p.parse();
this.head = p.compile(t, getEffectiveConverterMap());
ConverterUtil.startConverters(this.head);
} catch (ScanException ex) {
addError("Incorrect pattern found", ex);
errorCount++;
}
if (errorCount == 0) {
super.started = true;
}
}
代码示例来源:origin: tony19/logback-android
/**
* Returns a map where the default converter map is merged with the map
* contained in the context.
* @return the converter map
*/
public Map<String, String> getEffectiveConverterMap() {
Map<String, String> effectiveMap = new HashMap<String, String>();
// add the least specific map fist
Map<String, String> defaultMap = getDefaultConverterMap();
if (defaultMap != null) {
effectiveMap.putAll(defaultMap);
}
// contextMap is more specific than the default map
Context context = getContext();
if (context != null) {
@SuppressWarnings("unchecked")
Map<String, String> contextMap = (Map<String, String>) context
.getObject(CoreConstants.PATTERN_RULE_REGISTRY);
if (contextMap != null) {
effectiveMap.putAll(contextMap);
}
}
return effectiveMap;
}
代码示例来源:origin: camunda/camunda-bpm-platform
@Override
protected String computeConverterName(Converter c) {
if(c instanceof MDCConverter) {
MDCConverter mc = (MDCConverter) c;
String key = mc.getFirstOption();
if(key != null) {
return key;
} else {
return "MDC";
}
} else {
return super.computeConverterName(c);
}
}
}
代码示例来源:origin: camunda/camunda-bpm-platform
public String getPresentationHeader() {
StringBuilder sbuf = new StringBuilder();
sbuf.append("<hr/>");
sbuf.append(LINE_SEPARATOR);
sbuf.append("<p>Log session start time ");
sbuf.append(new java.util.Date());
sbuf.append("</p><p></p>");
sbuf.append(LINE_SEPARATOR);
sbuf.append(LINE_SEPARATOR);
sbuf.append("<table cellspacing=\"0\">");
sbuf.append(LINE_SEPARATOR);
buildHeaderRowForTable(sbuf);
return sbuf.toString();
}
代码示例来源:origin: tony19/logback-android
@Override
public void start() {
int errorCount = 0;
if (throwableRenderer == null) {
addError("ThrowableRender cannot be null.");
errorCount++;
}
if (errorCount == 0) {
super.start();
}
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/ch.qos.logback.core
/**
* Parses the pattern and creates the Converter linked list.
*/
@Override
public void start() {
int errorCount = 0;
try {
Parser<E> p = new Parser<E>(pattern);
p.setContext(getContext());
Node t = p.parse();
this.head = p.compile(t, getEffectiveConverterMap());
ConverterUtil.startConverters(this.head);
} catch (ScanException ex) {
addError("Incorrect pattern found", ex);
errorCount++;
}
if (errorCount == 0) {
super.started = true;
}
}
代码示例来源:origin: io.virtdata/virtdata-lib-realer
/**
* Returns a map where the default converter map is merged with the map
* contained in the context.
*/
public Map<String, String> getEffectiveConverterMap() {
Map<String, String> effectiveMap = new HashMap<String, String>();
// add the least specific map fist
Map<String, String> defaultMap = getDefaultConverterMap();
if (defaultMap != null) {
effectiveMap.putAll(defaultMap);
}
// contextMap is more specific than the default map
Context context = getContext();
if (context != null) {
@SuppressWarnings("unchecked")
Map<String, String> contextMap = (Map<String, String>) context.getObject(CoreConstants.PATTERN_RULE_REGISTRY);
if (contextMap != null) {
effectiveMap.putAll(contextMap);
}
}
return effectiveMap;
}
代码示例来源:origin: camunda/camunda-bpm-platform
private void buildHeaderRowForTable(StringBuilder sbuf) {
Converter c = head;
String name;
sbuf.append("<tr class=\"header\">");
sbuf.append(LINE_SEPARATOR);
while (c != null) {
name = computeConverterName(c);
if (name == null) {
c = c.getNext();
continue;
}
sbuf.append("<td class=\"");
sbuf.append(computeConverterName(c));
sbuf.append("\">");
sbuf.append(computeConverterName(c));
sbuf.append("</td>");
sbuf.append(LINE_SEPARATOR);
c = c.getNext();
}
sbuf.append("</tr>");
sbuf.append(LINE_SEPARATOR);
}
代码示例来源:origin: tony19/logback-android
protected void startNewTableIfLimitReached(StringBuilder sbuf) {
if (this.counter >= CoreConstants.TABLE_ROW_LIMIT) {
counter = 0;
sbuf.append("</table>");
sbuf.append(LINE_SEPARATOR);
sbuf.append("<p></p>");
sbuf.append("<table cellspacing=\"0\">");
sbuf.append(LINE_SEPARATOR);
buildHeaderRowForTable(sbuf);
}
}
代码示例来源:origin: Nextdoor/bender
@Override
public void start() {
int errorCount = 0;
if (throwableRenderer == null) {
addError("ThrowableRender cannot be null.");
errorCount++;
}
if (errorCount == 0) {
super.start();
}
}
代码示例来源:origin: Nextdoor/bender
/**
* Parses the pattern and creates the Converter linked list.
*/
@Override
public void start() {
int errorCount = 0;
try {
Parser<E> p = new Parser<E>(pattern);
p.setContext(getContext());
Node t = p.parse();
this.head = p.compile(t, getEffectiveConverterMap());
ConverterUtil.startConverters(this.head);
} catch (ScanException ex) {
addError("Incorrect pattern found", ex);
errorCount++;
}
if (errorCount == 0) {
super.started = true;
}
}
代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded
/**
* Returns a map where the default converter map is merged with the map
* contained in the context.
*/
public Map<String, String> getEffectiveConverterMap() {
Map<String, String> effectiveMap = new HashMap<String, String>();
// add the least specific map fist
Map<String, String> defaultMap = getDefaultConverterMap();
if (defaultMap != null) {
effectiveMap.putAll(defaultMap);
}
// contextMap is more specific than the default map
Context context = getContext();
if (context != null) {
@SuppressWarnings("unchecked")
Map<String, String> contextMap = (Map<String, String>) context.getObject(CoreConstants.PATTERN_RULE_REGISTRY);
if (contextMap != null) {
effectiveMap.putAll(contextMap);
}
}
return effectiveMap;
}
代码示例来源:origin: tony19/logback-android
@Override
protected String computeConverterName(Converter<ILoggingEvent> c) {
if(c instanceof MDCConverter) {
MDCConverter mc = (MDCConverter) c;
String key = mc.getFirstOption();
if(key != null) {
return key;
} else {
return "MDC";
}
} else {
return super.computeConverterName(c);
}
}
}
内容来源于网络,如有侵权,请联系作者删除!