OpenKeyWord  Build_ID: 457, Datum: 01.02.2020 07:45:48
Dont repeat yourself. - Do it once and only once!
LogError.java
1 package okw.log.log2html;
2 
3 import org.apache.commons.text.StringEscapeUtils;
4 
5 public class LogError extends LogBaseLeaf
6 {
7 
8  protected LogError( LogBase fpParent, String fpsInfo )
9  {
10  Info = fpsInfo;
11  myID = AllCount;
12  setParent(fpParent);
13 
14  ErrorCount();
15  }
16 
17 
18  // local Statistics
19  protected void ErrorCount()
20  {
21  bError = true;
22 
23  if ( myParent != null )
24  {
25  myParent.ErrorCount();
26  }
27  }
28 
29 
30  protected String getHTMLResult()
31  {
32  StringBuilder sbResult = new StringBuilder();
33 
34  String lvsIndention = this.getLevelIndention();
35 
36  sbResult.append( lvsIndention + myIndentionBase + "<p class='LogError'>" + StringEscapeUtils.escapeHtml4(this.Info) + "</p>\n" );
37 
38  return sbResult.toString();
39  }
40 
41 
42  protected String getJSONResult()
43  {
44  StringBuilder myJSON = new StringBuilder();
45 
46  myJSON.append( this.jsonElement( "Error", this.Info ) );
47 
48  return myJSON.toString();
49  }
50 }
okw.log.log2html.LogError
Definition: LogError.java:5
okw.log.log2html.LogBase
Definition: LogBase.java:7
okw.log.log2html.LogBaseLeaf
Definition: LogBaseLeaf.java:3