Package eu.woolplatform.utils.log
Interface LogDelegate
-
- All Known Implementing Classes:
AbstractLogDelegate,DefaultLogDelegate
public interface LogDelegateA log delegate can be set to theLogger. It determines how log messages are written (e.g. to a file, to standard output, to a database) and what levels of log messages are written.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intd(String tag, String msg)Writes a message at levelDEBUG.intd(String tag, String msg, Throwable tr)Writes a message at levelDEBUG.inte(String tag, String msg)Writes a message at levelERROR.inte(String tag, String msg, Throwable tr)Writes a message at levelERROR.StringgetStackTraceString(Throwable tr)Returns the stack trace string for the specified exception.inti(String tag, String msg)Writes a message at levelINFO.inti(String tag, String msg, Throwable tr)Writes a message at levelINFO.booleanisLoggable(String tag, int level)Determines if messages at the specified level are logged for the specified tag.intprintln(int priority, String tag, String msg)Writes a log message.intv(String tag, String msg)Writes a message at levelVERBOSE.intv(String tag, String msg, Throwable tr)Writes a message at levelVERBOSE.intw(String tag, String msg)Writes a message at levelWARN.intw(String tag, String msg, Throwable tr)Writes a message at levelWARN.intw(String tag, Throwable tr)Writes a message at levelWARN.intwtf(String tag, String msg)Writes a message at levelASSERT.intwtf(String tag, String msg, Throwable tr)Writes a message at levelASSERT.intwtf(String tag, Throwable tr)Writes a message at levelASSERT.
-
-
-
Method Detail
-
d
int d(String tag, String msg, Throwable tr)
Writes a message at levelDEBUG.- Parameters:
tag- the tagmsg- the messagetr- an exception- Returns:
- 0 if no error occurred, an error code otherwise
-
d
int d(String tag, String msg)
Writes a message at levelDEBUG.- Parameters:
tag- the tagmsg- the message- Returns:
- 0 if no error occurred, an error code otherwise
-
e
int e(String tag, String msg)
Writes a message at levelERROR.- Parameters:
tag- the tagmsg- the message- Returns:
- 0 if no error occurred, an error code otherwise
-
e
int e(String tag, String msg, Throwable tr)
Writes a message at levelERROR.- Parameters:
tag- the tagmsg- the messagetr- an exception- Returns:
- 0 if no error occurred, an error code otherwise
-
getStackTraceString
String getStackTraceString(Throwable tr)
Returns the stack trace string for the specified exception. The returned string probably contains new lines, but it does not have a trailing new line.- Parameters:
tr- the exception- Returns:
- the stack trace string
-
i
int i(String tag, String msg, Throwable tr)
Writes a message at levelINFO.- Parameters:
tag- the tagmsg- the messagetr- an exception- Returns:
- 0 if no error occurred, an error code otherwise
-
i
int i(String tag, String msg)
Writes a message at levelINFO.- Parameters:
tag- the tagmsg- the message- Returns:
- 0 if no error occurred, an error code otherwise
-
isLoggable
boolean isLoggable(String tag, int level)
Determines if messages at the specified level are logged for the specified tag.- Parameters:
tag- the taglevel- the level- Returns:
- true if the message will be logged, false otherwise
-
println
int println(int priority, String tag, String msg)Writes a log message.- Parameters:
priority- the log leveltag- the tagmsg- the message- Returns:
- 0 if no error occurred, an error code otherwise
-
v
int v(String tag, String msg, Throwable tr)
Writes a message at levelVERBOSE.- Parameters:
tag- the tagmsg- the messagetr- an exception or null- Returns:
- 0 if no error occurred, an error code otherwise
-
v
int v(String tag, String msg)
Writes a message at levelVERBOSE.- Parameters:
tag- the tagmsg- the message- Returns:
- 0 if no error occurred, an error code otherwise
-
w
int w(String tag, String msg)
Writes a message at levelWARN.- Parameters:
tag- the tagmsg- the message- Returns:
- 0 if the message was written successfully, an error code otherwise
-
w
int w(String tag, Throwable tr)
Writes a message at levelWARN.- Parameters:
tag- the tagtr- an exception or null- Returns:
- 0 if no error occurred, an error code otherwise
-
w
int w(String tag, String msg, Throwable tr)
Writes a message at levelWARN.- Parameters:
tag- the tagmsg- the messagetr- an exception or null- Returns:
- 0 if no error occurred, an error code otherwise
-
wtf
int wtf(String tag, String msg)
Writes a message at levelASSERT.- Parameters:
tag- the tagmsg- the message- Returns:
- 0 if no error occurred, an error code otherwise
-
wtf
int wtf(String tag, Throwable tr)
Writes a message at levelASSERT.- Parameters:
tag- the tagtr- an exception or null- Returns:
- 0 if no error occurred, an error code otherwise
-
-