1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.commons.vfs2;
18
19 import org.apache.commons.logging.Log;
20
21
22
23
24
25 public final class VfsLog {
26
27
28 private VfsLog() {
29 }
30
31
32
33
34
35
36
37
38
39 public static void warn(final Log vfsLog, final Log commonslog, final String message, final Throwable t) {
40 if (vfsLog != null) {
41 vfsLog.warn(message, t);
42 } else if (commonslog != null) {
43 commonslog.warn(message, t);
44 }
45 }
46
47
48
49
50
51
52
53
54 public static void warn(final Log vfsLog, final Log commonslog, final String message) {
55 if (vfsLog != null) {
56 vfsLog.warn(message);
57 } else if (commonslog != null) {
58 commonslog.warn(message);
59 }
60 }
61
62
63
64
65
66
67
68
69 public static void debug(final Log vfsLog, final Log commonslog, final String message) {
70 if (vfsLog != null) {
71 vfsLog.debug(message);
72 } else if (commonslog != null) {
73 commonslog.debug(message);
74 }
75 }
76
77
78
79
80
81
82
83
84
85 public static void debug(final Log vfsLog, final Log commonsLog, final String message, final Throwable t) {
86 if (vfsLog != null) {
87 vfsLog.debug(message, t);
88 } else if (commonsLog != null) {
89 commonsLog.debug(message, t);
90 }
91 }
92
93
94
95
96
97
98
99
100
101 public static void info(final Log vfsLog, final Log commonsLog, final String message, final Throwable t) {
102 if (vfsLog != null) {
103 vfsLog.info(message, t);
104 } else if (commonsLog != null) {
105 commonsLog.info(message, t);
106 }
107 }
108
109
110
111
112
113
114
115
116 public static void info(final Log vfsLog, final Log commonsLog, final String message) {
117 if (vfsLog != null) {
118 vfsLog.info(message);
119 } else if (commonsLog != null) {
120 commonsLog.info(message);
121 }
122 }
123
124
125
126
127
128
129
130
131
132 public static void error(final Log vfsLog, final Log commonsLog, final String message, final Throwable t) {
133 if (vfsLog != null) {
134 vfsLog.error(message, t);
135 } else if (commonsLog != null) {
136 commonsLog.error(message, t);
137 }
138 }
139
140
141
142
143
144
145
146
147 public static void error(final Log vfsLog, final Log commonsLog, final String message) {
148 if (vfsLog != null) {
149 vfsLog.error(message);
150 } else if (commonsLog != null) {
151 commonsLog.error(message);
152 }
153 }
154
155
156
157
158
159
160
161
162
163 public static void fatal(final Log vfsLog, final Log commonsLog, final String message, final Throwable t) {
164 if (vfsLog != null) {
165 vfsLog.fatal(message, t);
166 } else if (commonsLog != null) {
167 commonsLog.fatal(message, t);
168 }
169 }
170
171
172
173
174
175
176
177
178 public static void fatal(final Log vfsLog, final Log commonsLog, final String message) {
179 if (vfsLog != null) {
180 vfsLog.fatal(message);
181 } else if (commonsLog != null) {
182 commonsLog.fatal(message);
183 }
184 }
185 }