michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: package org.mozilla.gecko.background.common.log.writers; michael@0: michael@0: /** michael@0: * An abstract object that logs information in some way. michael@0: *
michael@0: * Intended to be composed with other log writers, for example a log
michael@0: * writer could make all log entries have the same single log tag, or
michael@0: * could ignore certain log levels, before delegating to an inner log
michael@0: * writer.
michael@0: */
michael@0: public abstract class LogWriter {
michael@0: public abstract void error(String tag, String message, Throwable error);
michael@0: public abstract void warn(String tag, String message, Throwable error);
michael@0: public abstract void info(String tag, String message, Throwable error);
michael@0: public abstract void debug(String tag, String message, Throwable error);
michael@0: public abstract void trace(String tag, String message, Throwable error);
michael@0:
michael@0: /**
michael@0: * We expect close
to be called only by static
michael@0: * synchronized methods in class Logger
.
michael@0: */
michael@0: public abstract void close();
michael@0:
michael@0: public abstract boolean shouldLogVerbose(String tag);
michael@0: }