01: /*
02: * Copyright 2005 Paul Hinds
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16: package org.tp23.antinstaller.runtime;
17:
18: import java.io.IOException;
19:
20: import org.tp23.antinstaller.Installer;
21:
22: public interface Logger {
23:
24: public void log(String message);
25:
26: /** log without new line */
27: public void loge(int b);
28:
29: /** log without new line */
30: public void loge(String b);
31:
32: public void log(Throwable exception);
33:
34: /**
35: * Logs the stack trace only if the installer is in verbose mode
36: * @param installer
37: * @param exception
38: */
39: public void log(Installer installer, Throwable exception);
40:
41: public void setFileName(String fileName) throws IOException;
42:
43: /**
44: * Get the name of the file used for logging
45: * @return path to file or <code>null</code> if not initialised
46: */
47: public String getFileName();
48:
49: public void close();
50: }
|