1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package com.googlecode.t7mp;
17
18
19
20
21
22
23 public class DefaultPluginLog implements PluginLog {
24
25 @Override
26 public void debug(CharSequence message) {
27 System.err.println(formatMessage(message));
28 }
29
30 @Override
31 public void debug(Throwable cause) {
32 cause.printStackTrace();
33 }
34
35 @Override
36 public void debug(CharSequence message, Throwable cause) {
37 System.err.println(formatMessage(message));
38 cause.printStackTrace();
39 }
40
41 @Override
42 public String formatMessage(CharSequence message) {
43 return message.toString();
44 }
45
46 @Override
47 public void error(CharSequence message) {
48 System.err.println(formatMessage(message));
49 }
50
51 @Override
52 public void error(Throwable cause) {
53 cause.printStackTrace();
54 }
55
56 @Override
57 public void error(CharSequence message, Throwable cause) {
58 System.err.println(formatMessage(message));
59 cause.printStackTrace();
60 }
61
62 @Override
63 public void info(CharSequence message) {
64 System.err.println(formatMessage(message));
65 }
66
67 @Override
68 public void info(Throwable cause) {
69 cause.printStackTrace();
70 }
71
72 @Override
73 public void info(CharSequence message, Throwable cause) {
74 System.err.println(formatMessage(message));
75 cause.printStackTrace();
76 }
77
78 @Override
79 public boolean isDebugEnabled() {
80 return false;
81 }
82
83 @Override
84 public boolean isErrorEnabled() {
85 return false;
86 }
87
88 @Override
89 public boolean isInfoEnabled() {
90 return true;
91 }
92
93 @Override
94 public boolean isWarnEnabled() {
95 return false;
96 }
97
98 @Override
99 public void warn(CharSequence message) {
100 System.err.println(formatMessage(message));
101 }
102
103 @Override
104 public void warn(Throwable cause) {
105 cause.printStackTrace();
106 }
107
108 @Override
109 public void warn(CharSequence message, Throwable cause) {
110 System.err.println(formatMessage(message));
111 cause.printStackTrace();
112 }
113
114 }