diff -r 000000000000 -r 6474c204b198 mobile/android/base/background/common/log/writers/LogWriter.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mobile/android/base/background/common/log/writers/LogWriter.java Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,29 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +package org.mozilla.gecko.background.common.log.writers; + +/** + * An abstract object that logs information in some way. + *
+ * Intended to be composed with other log writers, for example a log
+ * writer could make all log entries have the same single log tag, or
+ * could ignore certain log levels, before delegating to an inner log
+ * writer.
+ */
+public abstract class LogWriter {
+ public abstract void error(String tag, String message, Throwable error);
+ public abstract void warn(String tag, String message, Throwable error);
+ public abstract void info(String tag, String message, Throwable error);
+ public abstract void debug(String tag, String message, Throwable error);
+ public abstract void trace(String tag, String message, Throwable error);
+
+ /**
+ * We expect close
to be called only by static
+ * synchronized methods in class Logger
.
+ */
+ public abstract void close();
+
+ public abstract boolean shouldLogVerbose(String tag);
+}