Logger作成

This commit is contained in:
r-ca 2023-12-16 14:18:36 +09:00
parent 79dfc5b5ba
commit c3b53776e4
No known key found for this signature in database
GPG Key ID: 6A72911AC73464A9
2 changed files with 42 additions and 1 deletions

View File

@ -1,4 +1,12 @@
package one.nem.lacerta.utils; package one.nem.lacerta.utils;
public interface LacertaLogger { 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);
} }

View File

@ -1,4 +1,37 @@
package one.nem.lacerta.utils.impl; 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);
}
} }