mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-22 16:03:15 +00:00
Logger作成
This commit is contained in:
parent
79dfc5b5ba
commit
c3b53776e4
|
@ -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);
|
||||
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user