From c3b53776e4ba1a090887356c2cf7ef27cfc821f0 Mon Sep 17 00:00:00 2001 From: r-ca Date: Sat, 16 Dec 2023 14:18:36 +0900 Subject: [PATCH] =?UTF-8?q?Logger=E4=BD=9C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../one/nem/lacerta/utils/LacertaLogger.java | 8 +++++ .../lacerta/utils/impl/LacertaLoggerImpl.java | 35 ++++++++++++++++++- 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/utils/src/main/java/one/nem/lacerta/utils/LacertaLogger.java b/utils/src/main/java/one/nem/lacerta/utils/LacertaLogger.java index aaca0565..f49da584 100644 --- a/utils/src/main/java/one/nem/lacerta/utils/LacertaLogger.java +++ b/utils/src/main/java/one/nem/lacerta/utils/LacertaLogger.java @@ -1,4 +1,12 @@ package one.nem.lacerta.utils; public interface LacertaLogger { + + void info(String tag, String message); + void warn(String tag, String message); + void error(String tag, String message); + void debug(String tag, String message); + void trace(String tag, String message); + void fatal(String tag, String message); + } diff --git a/utils/src/main/java/one/nem/lacerta/utils/impl/LacertaLoggerImpl.java b/utils/src/main/java/one/nem/lacerta/utils/impl/LacertaLoggerImpl.java index ec8e27c7..ac3d8c0b 100644 --- a/utils/src/main/java/one/nem/lacerta/utils/impl/LacertaLoggerImpl.java +++ b/utils/src/main/java/one/nem/lacerta/utils/impl/LacertaLoggerImpl.java @@ -1,4 +1,37 @@ package one.nem.lacerta.utils.impl; -public class LacertaLoggerImpl { +import android.util.Log; + +import one.nem.lacerta.utils.LacertaLogger; +public class LacertaLoggerImpl implements LacertaLogger{ + + @Override + public void info(String tag, String message) { + Log.i(tag, message); + } + + @Override + public void warn(String tag, String message) { + Log.w(tag, message); + } + + @Override + public void error(String tag, String message) { + Log.e(tag, message); + } + + @Override + public void debug(String tag, String message) { + Log.d(tag, message); + } + + @Override + public void trace(String tag, String message) { + Log.v(tag, message); + } + + @Override + public void fatal(String tag, String message) { + Log.wtf(tag, message); + } }