1
2
3
4
5
6
7
8
9
10
11
12
13
14 package ch.qos.logback.classic.html;
15
16 import ch.qos.logback.core.CoreConstants;
17 import static ch.qos.logback.core.CoreConstants.LINE_SEPARATOR;
18 import ch.qos.logback.core.html.CssBuilder;
19
20
21
22
23
24
25
26
27 public class DefaultCssBuilder implements CssBuilder {
28
29 public void addCss(StringBuilder sbuf) {
30 sbuf.append("<style type=\"text/css\">");
31 sbuf.append(LINE_SEPARATOR);
32 sbuf.append("table { margin-left: 2em; margin-right: 2em; border-left: 2px solid #AAA; }");
33 sbuf.append(LINE_SEPARATOR);
34
35 sbuf.append("TR.even { background: #FFFFFF; }");
36 sbuf.append(LINE_SEPARATOR);
37
38 sbuf.append("TR.odd { background: #EAEAEA; }");
39 sbuf.append(LINE_SEPARATOR);
40
41 sbuf.append("TR.warn TD.Level, TR.error TD.Level, TR.fatal TD.Level {font-weight: bold; color: #FF4040 }");
42 sbuf.append(CoreConstants.LINE_SEPARATOR);
43
44 sbuf.append("TD { padding-right: 1ex; padding-left: 1ex; border-right: 2px solid #AAA; }");
45 sbuf.append(LINE_SEPARATOR);
46
47 sbuf.append("TD.Time, TD.Date { text-align: right; font-family: courier, monospace; font-size: smaller; }");
48 sbuf.append(LINE_SEPARATOR);
49
50 sbuf.append("TD.Thread { text-align: left; }");
51 sbuf.append(LINE_SEPARATOR);
52
53 sbuf.append("TD.Level { text-align: right; }");
54 sbuf.append(LINE_SEPARATOR);
55
56 sbuf.append("TD.Logger { text-align: left; }");
57 sbuf.append(LINE_SEPARATOR);
58
59 sbuf.append("TR.header { background: #596ED5; color: #FFF; font-weight: bold; font-size: larger; }");
60 sbuf.append(CoreConstants.LINE_SEPARATOR);
61
62 sbuf.append("TD.Exception { background: #A2AEE8; font-family: courier, monospace;}");
63 sbuf.append(LINE_SEPARATOR);
64
65 sbuf.append("</style>");
66 sbuf.append(LINE_SEPARATOR);
67 }
68 }