1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/mobile/android/base/background/common/log/writers/LogWriter.java Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,29 @@ 1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.7 + 1.8 +package org.mozilla.gecko.background.common.log.writers; 1.9 + 1.10 +/** 1.11 + * An abstract object that logs information in some way. 1.12 + * <p> 1.13 + * Intended to be composed with other log writers, for example a log 1.14 + * writer could make all log entries have the same single log tag, or 1.15 + * could ignore certain log levels, before delegating to an inner log 1.16 + * writer. 1.17 + */ 1.18 +public abstract class LogWriter { 1.19 + public abstract void error(String tag, String message, Throwable error); 1.20 + public abstract void warn(String tag, String message, Throwable error); 1.21 + public abstract void info(String tag, String message, Throwable error); 1.22 + public abstract void debug(String tag, String message, Throwable error); 1.23 + public abstract void trace(String tag, String message, Throwable error); 1.24 + 1.25 + /** 1.26 + * We expect <code>close</code> to be called only by static 1.27 + * synchronized methods in class <code>Logger</code>. 1.28 + */ 1.29 + public abstract void close(); 1.30 + 1.31 + public abstract boolean shouldLogVerbose(String tag); 1.32 +}