diff -r 000000000000 -r 6474c204b198 mobile/android/base/background/common/log/writers/AndroidLogWriter.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mobile/android/base/background/common/log/writers/AndroidLogWriter.java Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,40 @@ +/* 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; + +import android.util.Log; + +/** + * Log to the Android log. + */ +public class AndroidLogWriter extends LogWriter { + @Override + public boolean shouldLogVerbose(String logTag) { + return true; + } + + public void error(String tag, String message, Throwable error) { + Log.e(tag, message, error); + } + + public void warn(String tag, String message, Throwable error) { + Log.w(tag, message, error); + } + + public void info(String tag, String message, Throwable error) { + Log.i(tag, message, error); + } + + public void debug(String tag, String message, Throwable error) { + Log.d(tag, message, error); + } + + public void trace(String tag, String message, Throwable error) { + Log.v(tag, message, error); + } + + public void close() { + } +}