package com.levelup.logutils;



/**
 * helper class to use the FLog from a class rather than using the static methods
 * <p> unlike {@link FLogger} this one has a single tag set
 */
public class FLoggerTagged {
	protected final String tag;
	
	/**
	 * method called for every log call in case the file logger wasn't ready before
	 * 
	 * @param level
	 */
	protected void assertLogger(FLogLevel level) {}
	
	public FLoggerTagged(String tag) {
		assertLogger(FLogLevel.V);
		this.tag = tag;
	}

	public void v(String message) {
		assertLogger(FLogLevel.V);
		FLog.v(tag, message);
	}

	public void v(String message, Throwable tr) {
		assertLogger(FLogLevel.V);
		FLog.v(tag, message, tr);
	}

	public void d(String message) {
		assertLogger(FLogLevel.D);
		FLog.d(tag, message);
	}

	public void d(String message, Throwable tr) {
		assertLogger(FLogLevel.D);
		FLog.d(tag, message, tr);
	}

	public void i(String message) {
		assertLogger(FLogLevel.I);
		FLog.i(tag, message);
	}

	public void i(String message, Throwable tr) {
		assertLogger(FLogLevel.I);
		FLog.i(tag, message, tr);
	}

	public void w(String message) {
		assertLogger(FLogLevel.W);
		FLog.w(tag, message);
	}

	public void w(String message, Throwable tr) {
		assertLogger(FLogLevel.W);
		FLog.w(tag, message, tr);
	}

	public void e(String message) {
		assertLogger(FLogLevel.E);
		FLog.e(tag, message);
	}

	public void e(String message, Throwable tr) {
		assertLogger(FLogLevel.E);
		FLog.e(tag, message, tr);
	}
}

@@ -487,36 +487,35 @@
 ag;%0A%09%7D%0A%0A%09public 
-void
+int
  v(String messag
@@ -564,32 +564,44 @@
 (tag, message);%0A
+%09%09return 0;%0A
 %09%7D%0A%0A%09public void
@@ -596,20 +596,19 @@
 %09public 
-void
+int
  v(Strin
@@ -683,32 +683,44 @@
 , message, tr);%0A
+%09%09return 0;%0A
 %09%7D%0A%0A%09public void
@@ -707,36 +707,35 @@
  0;%0A%09%7D%0A%0A%09public 
-void
+int
  d(String messag
@@ -784,32 +784,44 @@
 (tag, message);%0A
+%09%09return 0;%0A
 %09%7D%0A%0A%09public void
@@ -816,20 +816,19 @@
 %09public 
-void
+int
  d(Strin
@@ -903,32 +903,44 @@
 , message, tr);%0A
+%09%09return 0;%0A
 %09%7D%0A%0A%09public void
@@ -927,36 +927,35 @@
  0;%0A%09%7D%0A%0A%09public 
-void
+int
  i(String messag
@@ -1004,32 +1004,44 @@
 (tag, message);%0A
+%09%09return 0;%0A
 %09%7D%0A%0A%09public void
@@ -1036,20 +1036,19 @@
 %09public 
-void
+int
  i(Strin
@@ -1123,32 +1123,44 @@
 , message, tr);%0A
+%09%09return 0;%0A
 %09%7D%0A%0A%09public void
@@ -1147,36 +1147,35 @@
  0;%0A%09%7D%0A%0A%09public 
-void
+int
  w(String messag
@@ -1224,32 +1224,44 @@
 (tag, message);%0A
+%09%09return 0;%0A
 %09%7D%0A%0A%09public void
@@ -1256,20 +1256,19 @@
 %09public 
-void
+int
  w(Strin
@@ -1351,16 +1351,28 @@
 e, tr);%0A
+%09%09return 0;%0A
 %09%7D%0A%0A%09pub
@@ -1367,36 +1367,35 @@
  0;%0A%09%7D%0A%0A%09public 
-void
+int
  e(String messag
@@ -1452,16 +1452,28 @@
 ssage);%0A
+%09%09return 0;%0A
 %09%7D%0A%0A%09pub
@@ -1476,20 +1476,19 @@
 %09public 
-void
+int
  e(Strin
@@ -1571,13 +1571,25 @@
 e, tr);%0A
+%09%09return 0;%0A
 %09%7D%0A%7D%0A

make FloggerTagged return an int like Log.X()