You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
713 B
Java
39 lines
713 B
Java
package com.ahmedjazzar.rosetta;
|
|
|
|
import android.util.Log;
|
|
|
|
/**
|
|
* This class helps logging app events without a need to rewrite the tag name in every time
|
|
* Created by ahmedjazzar on 1/16/16.
|
|
*/
|
|
|
|
class Logger {
|
|
|
|
private final String mTag;
|
|
|
|
Logger(String tag) {
|
|
this.mTag = tag;
|
|
this.verbose("Object from " + this.mTag + " has been created.");
|
|
}
|
|
|
|
void error(String log) {
|
|
Log.e(this.mTag, log);
|
|
}
|
|
|
|
void warn(String log) {
|
|
Log.w(this.mTag, log);
|
|
}
|
|
|
|
void debug(String log) {
|
|
Log.d(this.mTag, log);
|
|
}
|
|
|
|
void info(String log) {
|
|
Log.i(this.mTag, log);
|
|
}
|
|
|
|
void verbose(String log) {
|
|
Log.v(this.mTag, log);
|
|
}
|
|
}
|