|
1 /* This Source Code Form is subject to the terms of the Mozilla Public |
|
2 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
4 |
|
5 package org.mozilla.gecko.background.common.log.writers; |
|
6 |
|
7 /** |
|
8 * An abstract object that logs information in some way. |
|
9 * <p> |
|
10 * Intended to be composed with other log writers, for example a log |
|
11 * writer could make all log entries have the same single log tag, or |
|
12 * could ignore certain log levels, before delegating to an inner log |
|
13 * writer. |
|
14 */ |
|
15 public abstract class LogWriter { |
|
16 public abstract void error(String tag, String message, Throwable error); |
|
17 public abstract void warn(String tag, String message, Throwable error); |
|
18 public abstract void info(String tag, String message, Throwable error); |
|
19 public abstract void debug(String tag, String message, Throwable error); |
|
20 public abstract void trace(String tag, String message, Throwable error); |
|
21 |
|
22 /** |
|
23 * We expect <code>close</code> to be called only by static |
|
24 * synchronized methods in class <code>Logger</code>. |
|
25 */ |
|
26 public abstract void close(); |
|
27 |
|
28 public abstract boolean shouldLogVerbose(String tag); |
|
29 } |