| Logger.java |
1 /*
2 * Copyright 2005 Paul Hinds
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
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 */
16package org.tp23.antinstaller.runtime;
17
18import java.io.IOException;
19
20import org.tp23.antinstaller.Installer;
21
22public interface Logger {
23
24 public void log(String message);
25
26 public void log(Throwable exception);
27
28 /**
29 * Logs the stack trace only if the installer is in verbose mode
30 * @param installer
31 * @param exception
32 */
33 public void log(Installer installer, Throwable exception);
34
35 public void setFileName(String fileName) throws IOException;
36
37 /**
38 * Get the name of the file used for logging
39 * @return path to file or <code>null</code> if not initialised
40 */
41 public String getFileName();
42
43 public void close();
44}
45