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